Bug 1315044 - Cache ContentActor forms to prevent creating new one when calling RootActor.getProcess multiple times. r=jryans

MozReview-Commit-ID: 3YyShRXQhel
This commit is contained in:
Alexandre Poirot
2016-11-04 08:05:15 -07:00
parent b349500415
commit 337a135aa3
3 changed files with 35 additions and 6 deletions

View File

@@ -715,7 +715,7 @@ var DebuggerServer = {
return this._onConnection(transport, prefix, true);
},
connectToContent(connection, mm) {
connectToContent(connection, mm, onDestroy) {
let deferred = SyncPromise.defer();
let prefix = connection.allocID("content-process");
@@ -764,6 +764,10 @@ var DebuggerServer = {
// Nothing to do
}
}
if (onDestroy) {
onDestroy(mm);
}
}
let onMessageManagerClose = DevToolsUtils.makeInfallible((subject, topic, data) => {