Bug 937172 - Use a parent-determined prefix for debugging child processes (r=ochameau,past)

This commit is contained in:
Bill McCloskey 2014-03-10 09:38:12 -07:00
Родитель de1400e7cc
Коммит 802962c8f8
2 изменённых файлов: 5 добавлений и 11 удалений

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

@ -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);

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

@ -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;
},