Bug 1436614 - Report ghost windows in Memory.jsm. r=mconley

This adds a 'ghosts' field to the object returned by Memory.summary.

--HG--
extra : rebase_source : 9bef4f795615aad9a98b12be6277124bd88cbcd2
This commit is contained in:
Eric Rahm 2018-02-07 15:46:57 -08:00
Родитель ea10da080c
Коммит c8cd2f8b6a
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -49,11 +49,13 @@ if (gInContentProcess) {
.getService(Ci.nsIMemoryReporterManager);
let rss = memMgr.resident;
let uss = memMgr.residentUnique;
let ghosts = memMgr.ghostWindows;
Services.cpmm.sendAsyncMessage("Memory:Summary", {
pid,
summary: {
uss,
rss,
ghosts,
}
});
},

Просмотреть файл

@ -22,10 +22,12 @@ this.Memory = {
* "parent": {
* uss: <int>,
* rss: <int>,
* ghosts: <int>,
* },
* <pid>: {
* uss: <int>,
* rss: <int>,
* ghosts: <int>,
* },
* ...
* }
@ -65,7 +67,8 @@ this.Memory = {
.getService(Ci.nsIMemoryReporterManager);
let rss = memMgr.resident;
let uss = memMgr.residentUnique;
this._summaries.Parent = { uss, rss };
let ghosts = memMgr.ghostWindows;
this._summaries.Parent = { uss, rss, ghosts };
this._pendingResolve(this._summaries);
this._pendingResolve = null;
this._summaries = null;