| OLD | NEW |
| 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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 loader = Loader({ | 81 loader = Loader({ |
| 82 paths: { | 82 paths: { |
| 83 "": info.addonRoot + "lib/" | 83 "": info.addonRoot + "lib/" |
| 84 }, | 84 }, |
| 85 globals: { | 85 globals: { |
| 86 Components, Cc, Ci, Cu, Cr, atob, btoa, onShutdown, | 86 Components, Cc, Ci, Cu, Cr, atob, btoa, onShutdown, |
| 87 addMessageListener, removeMessageListener, | 87 addMessageListener, removeMessageListener, |
| 88 sendAsyncMessage: sendAsyncMessageWithResponse, | 88 sendAsyncMessage: sendAsyncMessageWithResponse, |
| 89 sendSyncMessage: sendSyncMessageSingleResponse | 89 sendSyncMessage: sendSyncMessageSingleResponse |
| 90 }, | 90 }, |
| 91 modules: {"info": info}, | 91 modules: {"info": info, "messageManager": this}, |
| 92 id: info.addonID | 92 id: info.addonID |
| 93 }); | 93 }); |
| 94 onShutdown.add(() => unload(loader, "disable")) | 94 onShutdown.add(() => unload(loader, "disable")) |
| 95 | 95 |
| 96 main(loader, "child/main"); | 96 main(loader, "child/main"); |
| 97 } | 97 } |
| 98 | 98 |
| 99 function shutdown(message) | 99 function shutdown(message) |
| 100 { | 100 { |
| 101 if (message.data == Components.stack.filename) | 101 if (message.data == Components.stack.filename) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 sendAsyncMessageWithResponse("AdblockPlus:GetInfo", null, init); | 119 sendAsyncMessageWithResponse("AdblockPlus:GetInfo", null, init); |
| 120 addMessageListener("AdblockPlus:Response", onResponse); | 120 addMessageListener("AdblockPlus:Response", onResponse); |
| 121 addMessageListener("AdblockPlus:Shutdown", shutdown); | 121 addMessageListener("AdblockPlus:Shutdown", shutdown); |
| 122 onShutdown.add(() => { | 122 onShutdown.add(() => { |
| 123 removeMessageListener("AdblockPlus:Response", onResponse); | 123 removeMessageListener("AdblockPlus:Response", onResponse); |
| 124 removeMessageListener("AdblockPlus:Shutdown", shutdown); | 124 removeMessageListener("AdblockPlus:Shutdown", shutdown); |
| 125 }); | 125 }); |
| 126 })(); | 126 })(); |
| OLD | NEW |