Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-09-22 20:54:25 +08:00
commit 2b0cdc7b62
18 changed files with 104 additions and 37 deletions

View file

@ -304,6 +304,9 @@ function onLoad()
"collection followed by a cycle collection, and causes the " +
"process to reduce memory usage in other ways, e.g. by " +
"flushing various caches.";
const UGDesc = "Unlink any known ghost windows, to enable investigating " +
"what caused them. This is only for debugging leaks, and " +
"can cause bad things to happen if called.";
const GCAndCCLogDesc = "Save garbage collection log and concise cycle " +
"collection log.\n" +
@ -357,6 +360,7 @@ function onLoad()
appendButton(row3, GCDesc, doGC, "GC");
appendButton(row3, CCDesc, doCC, "CC");
appendButton(row3, MMDesc, doMMU, "Minimize memory usage");
appendButton(row3, UGDesc, doUGW, "Unlink ghost windows");
let row4 = appendElement(ops, "div", "opsRow");
@ -429,6 +433,12 @@ function doMMU()
() => updateMainAndFooter("Memory minimization completed", HIDE_FOOTER));
}
function doUGW()
{
Cu.unlinkGhostWindows();
updateMainAndFooter("Unlink ghost windows completed", HIDE_FOOTER);
}
function doMeasure()
{
updateAboutMemoryFromReporters();