mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-29 10:37:33 +09:00
Issue #2251 - Expose unlink ghost windows to about:memory
This commit is contained in:
parent
97a40adc75
commit
814a769541
1 changed files with 10 additions and 0 deletions
|
|
@ -304,6 +304,9 @@ function onLoad()
|
||||||
"collection followed by a cycle collection, and causes the " +
|
"collection followed by a cycle collection, and causes the " +
|
||||||
"process to reduce memory usage in other ways, e.g. by " +
|
"process to reduce memory usage in other ways, e.g. by " +
|
||||||
"flushing various caches.";
|
"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 " +
|
const GCAndCCLogDesc = "Save garbage collection log and concise cycle " +
|
||||||
"collection log.\n" +
|
"collection log.\n" +
|
||||||
|
|
@ -357,6 +360,7 @@ function onLoad()
|
||||||
appendButton(row3, GCDesc, doGC, "GC");
|
appendButton(row3, GCDesc, doGC, "GC");
|
||||||
appendButton(row3, CCDesc, doCC, "CC");
|
appendButton(row3, CCDesc, doCC, "CC");
|
||||||
appendButton(row3, MMDesc, doMMU, "Minimize memory usage");
|
appendButton(row3, MMDesc, doMMU, "Minimize memory usage");
|
||||||
|
appendButton(row3, UGDesc, doUGW, "Unlink ghost windows");
|
||||||
|
|
||||||
let row4 = appendElement(ops, "div", "opsRow");
|
let row4 = appendElement(ops, "div", "opsRow");
|
||||||
|
|
||||||
|
|
@ -429,6 +433,12 @@ function doMMU()
|
||||||
() => updateMainAndFooter("Memory minimization completed", HIDE_FOOTER));
|
() => updateMainAndFooter("Memory minimization completed", HIDE_FOOTER));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doUGW()
|
||||||
|
{
|
||||||
|
Cu.unlinkGhostWindows();
|
||||||
|
updateMainAndFooter("Unlink ghost windows completed", HIDE_FOOTER);
|
||||||
|
}
|
||||||
|
|
||||||
function doMeasure()
|
function doMeasure()
|
||||||
{
|
{
|
||||||
updateAboutMemoryFromReporters();
|
updateAboutMemoryFromReporters();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue