| LEFT | RIGHT |
| 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 | 556 |
| 557 if (callbackID) | 557 if (callbackID) |
| 558 { | 558 { |
| 559 let target = message.target.QueryInterface(Ci.nsIMessageSender); | 559 let target = message.target.QueryInterface(Ci.nsIMessageSender); |
| 560 target.sendAsyncMessage("AdblockPlus:Response", { | 560 target.sendAsyncMessage("AdblockPlus:Response", { |
| 561 callbackID, | 561 callbackID, |
| 562 response | 562 response |
| 563 }); | 563 }); |
| 564 } | 564 } |
| 565 else | 565 else |
| 566 return JSON.stringify(response); | 566 return response; |
| 567 }; | 567 }; |
| 568 messageManager.addMessageListener(messageName, wrapper); | 568 messageManager.addMessageListener(messageName, wrapper); |
| 569 onShutdown.add(() => messageManager.removeMessageListener(messageName, wrapp
er)); | 569 onShutdown.add(() => messageManager.removeMessageListener(messageName, wrapp
er)); |
| 570 } | 570 } |
| 571 }; | 571 }; |
| 572 | 572 |
| 573 /** | 573 /** |
| 574 * A cache with a fixed capacity, newer entries replace entries that have been | 574 * A cache with a fixed capacity, newer entries replace entries that have been |
| 575 * stored first. | 575 * stored first. |
| 576 * @constructor | 576 * @constructor |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 Cu.reportError(e); | 820 Cu.reportError(e); |
| 821 // Expected, ctypes isn't supported in Gecko 1.9.2 | 821 // Expected, ctypes isn't supported in Gecko 1.9.2 |
| 822 return null; | 822 return null; |
| 823 } | 823 } |
| 824 }); | 824 }); |
| 825 | 825 |
| 826 if ("@mozilla.org/messenger/headerparser;1" in Cc) | 826 if ("@mozilla.org/messenger/headerparser;1" in Cc) |
| 827 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen
ger/headerparser;1", "nsIMsgHeaderParser"); | 827 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen
ger/headerparser;1", "nsIMsgHeaderParser"); |
| 828 else | 828 else |
| 829 Utils.headerParser = null; | 829 Utils.headerParser = null; |
| LEFT | RIGHT |