Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/main.js

Issue 29338425: Issue 3499 - Remove old messaging API (Closed)
Patch Set: Created March 16, 2016, 12:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/child/bootstrap.js ('k') | lib/utils.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/main.js
===================================================================
--- a/lib/main.js
+++ b/lib/main.js
@@ -31,20 +31,19 @@ require("notification");
require("sync");
require("messageResponder");
require("ui");
require("objectTabs");
function bootstrapChildProcesses()
{
let info = require("info");
- let {Utils} = require("utils");
- Utils.addChildMessageListener("AdblockPlus:GetInfo", () => info);
- let processScript = info.addonRoot + "lib/child/bootstrap.js?" + Math.random();
+ let processScript = info.addonRoot + "lib/child/bootstrap.js?" +
+ Math.random() + "#" + encodeURIComponent(JSON.stringify(info));
Thomas Greiner 2016/03/23 14:09:20 That looks a bit hacky and not easily extensible.
Wladimir Palant 2016/03/23 15:29:33 I don't think extensibility matters here. I've imp
let messageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIProcessScriptLoader)
.QueryInterface(Ci.nsIMessageBroadcaster);
messageManager.loadProcessScript(processScript, true);
onShutdown.add(() => {
messageManager.broadcastAsyncMessage("AdblockPlus:Shutdown", processScript);
messageManager.removeDelayedProcessScript(processScript);
« no previous file with comments | « lib/child/bootstrap.js ('k') | lib/utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld