зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264873 - Ensure exposing memory actor for the browser content toolbox. r=yulia
MozReview-Commit-ID: 3duHXef13M4 --HG-- extra : rebase_source : 8f372fedbbfe59ec7c2756bde61450e67f46345a
This commit is contained in:
Родитель
85865937f5
Коммит
6a298fd038
|
@ -22,6 +22,7 @@ const { assert } = require("devtools/shared/DevToolsUtils");
|
|||
const { TabSources } = require("devtools/server/actors/utils/TabSources");
|
||||
|
||||
loader.lazyRequireGetter(this, "WorkerTargetActorList", "devtools/server/actors/worker/worker-list", true);
|
||||
loader.lazyRequireGetter(this, "MemoryActor", "devtools/server/actors/memory", true);
|
||||
|
||||
function ContentProcessTargetActor(connection) {
|
||||
this.conn = connection;
|
||||
|
@ -104,13 +105,17 @@ ContentProcessTargetActor.prototype = {
|
|||
this.threadActor = new ChromeDebuggerActor(this.conn, this);
|
||||
this._contextPool.addActor(this.threadActor);
|
||||
}
|
||||
|
||||
if (!this.memoryActor) {
|
||||
this.memoryActor = new MemoryActor(this.conn, this);
|
||||
this._contextPool.addActor(this.memoryActor);
|
||||
}
|
||||
return {
|
||||
actor: this.actorID,
|
||||
name: "Content process",
|
||||
|
||||
consoleActor: this._consoleActor.actorID,
|
||||
chromeDebugger: this.threadActor.actorID,
|
||||
memoryActor: this.memoryActor.actorID,
|
||||
|
||||
traits: {
|
||||
highlightable: false,
|
||||
|
|
|
@ -418,8 +418,14 @@ Memory.prototype = {
|
|||
* Accesses the docshell to return the current process time.
|
||||
*/
|
||||
_getCurrentTime: function() {
|
||||
return (this.parent.isRootActor ? this.parent.docShell :
|
||||
this.parent.originalDocShell).now();
|
||||
const docShell = this.parent.isRootActor ? this.parent.docShell :
|
||||
this.parent.originalDocShell;
|
||||
if (docShell) {
|
||||
return docShell.now();
|
||||
}
|
||||
// When used from the ContentProcessTargetActor, parent has no docShell,
|
||||
// so fallback to Cu.now
|
||||
return Cu.now();
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче