diff --git a/toolkit/devtools/server/child.js b/toolkit/devtools/server/child.js index a5553507c32a..6e296fa9402d 100644 --- a/toolkit/devtools/server/child.js +++ b/toolkit/devtools/server/child.js @@ -26,18 +26,14 @@ let mm = msg.target; - let prefix = msg.data.prefix + docShell.appId; - - let conn = DebuggerServer.connectToParent(prefix, mm); + let conn = DebuggerServer.connectToParent(msg.data.prefix, mm); let actor = new DebuggerServer.ContentAppActor(conn, content); let actorPool = new ActorPool(conn); actorPool.addActor(actor); conn.addActorPool(actorPool); - sendAsyncMessage("debug:actor", {actor: actor.grip(), - appId: docShell.appId, - prefix: prefix}); + sendAsyncMessage("debug:actor", {actor: actor.grip()}); }); addMessageListener("debug:connect", onConnect); diff --git a/toolkit/devtools/server/main.js b/toolkit/devtools/server/main.js index c6d7b2ed1bfb..397ded1d1a0e 100644 --- a/toolkit/devtools/server/main.js +++ b/toolkit/devtools/server/main.js @@ -531,13 +531,12 @@ var DebuggerServer = { let mm = aMessageManager; mm.loadFrameScript("resource://gre/modules/devtools/server/child.js", false); - let actor, childTransport, prefix; + let actor, childTransport; + let prefix = aConnection.allocID("child"); let onActorCreated = DevToolsUtils.makeInfallible(function (msg) { mm.removeMessageListener("debug:actor", onActorCreated); - prefix = msg.json.prefix; - // Pipe Debugger message from/to parent/child via the message manager childTransport = new ChildDebuggerTransport(mm, prefix); childTransport.hooks = { @@ -586,8 +585,7 @@ var DebuggerServer = { Services.obs.addObserver(onMessageManagerDisconnect, "message-manager-disconnect", false); - let prefixStart = aConnection.prefix + "child"; - mm.sendAsyncMessage("debug:connect", { prefix: prefixStart }); + mm.sendAsyncMessage("debug:connect", { prefix: prefix }); return deferred.promise; },