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

Delta Between Two Patch Sets: lib/child/bootstrap.js

Issue 29329895: Issue 3290 - Adblock Plus child modules don`t always start up (Closed)
Left Patch Set: Created Nov. 9, 2015, 3:37 p.m.
Right Patch Set: Removed unnecessary statement Created Dec. 1, 2015, 7:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/main.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 function onResponse(message) 68 function onResponse(message)
69 { 69 {
70 let {callbackID, response} = message.data; 70 let {callbackID, response} = message.data;
71 if (callbacks.has(callbackID)) 71 if (callbacks.has(callbackID))
72 { 72 {
73 let callback = callbacks.get(callbackID); 73 let callback = callbacks.get(callbackID);
74 callbacks.delete(callbackID); 74 callbacks.delete(callbackID);
75 callback(response); 75 callback(response);
76 } 76 }
77 } 77 }
Wladimir Palant 2015/11/09 15:41:08 The functions and variables above merely moved bec
78 78
79 function init(info) 79 function init(info)
80 { 80 {
81 removeMessageListener("AdblockPlus:Info", init);
Thomas Greiner 2015/12/01 15:40:27 You removed `addMessageListener("AdblockPlus:Info"
Wladimir Palant 2015/12/01 19:12:21 Done.
82
83 loader = Loader({ 81 loader = Loader({
84 paths: { 82 paths: {
85 "": info.addonRoot + "lib/" 83 "": info.addonRoot + "lib/"
86 }, 84 },
87 globals: { 85 globals: {
88 Components, Cc, Ci, Cu, Cr, atob, btoa, onShutdown, 86 Components, Cc, Ci, Cu, Cr, atob, btoa, onShutdown,
89 addMessageListener, removeMessageListener, 87 addMessageListener, removeMessageListener,
90 sendAsyncMessage: sendAsyncMessageWithResponse, 88 sendAsyncMessage: sendAsyncMessageWithResponse,
91 sendSyncMessage: sendSyncMessageSingleResponse 89 sendSyncMessage: sendSyncMessageSingleResponse
92 }, 90 },
(...skipping 26 matching lines...) Expand all
119 } 117 }
120 118
121 sendAsyncMessageWithResponse("AdblockPlus:GetInfo", null, init); 119 sendAsyncMessageWithResponse("AdblockPlus:GetInfo", null, init);
122 addMessageListener("AdblockPlus:Response", onResponse); 120 addMessageListener("AdblockPlus:Response", onResponse);
123 addMessageListener("AdblockPlus:Shutdown", shutdown); 121 addMessageListener("AdblockPlus:Shutdown", shutdown);
124 onShutdown.add(() => { 122 onShutdown.add(() => {
125 removeMessageListener("AdblockPlus:Response", onResponse); 123 removeMessageListener("AdblockPlus:Response", onResponse);
126 removeMessageListener("AdblockPlus:Shutdown", shutdown); 124 removeMessageListener("AdblockPlus:Shutdown", shutdown);
127 }); 125 });
128 })(); 126 })();
129
LEFTRIGHT
« no previous file | lib/main.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld