/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class ProcessActorList {
constructor() { this._actors = new Map(); this._onListChanged = null; this._mustNotify = false; this._hasObserver = false;
}
getList() { const processes = []; for (let i = 0; i < ppmm.childCount; i++) { const mm = ppmm.getChildAt(i);
processes.push({ // An ID of zero is always used for the parent. It would be nice to fix // this so that the pid is also used for the parent, see bug 1587443.
id: mm.isInProcess ? 0 : mm.osPid,
parent: mm.isInProcess, // TODO: exposes process message manager on frameloaders in order to compute this
tabCount: undefined,
});
} this._mustNotify = true; this._checkListening();
return processes;
}
get onListChanged() { returnthis._onListChanged;
}
set onListChanged(onListChanged) { if (typeof onListChanged !== "function" && onListChanged !== null) { thrownew Error("onListChanged must be either a function or null.");
} if (onListChanged === this._onListChanged) { return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.