| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 // be used in earlier releases. | 406 // be used in earlier releases. |
| 407 let httpTopic = "http-on-opening-request"; | 407 let httpTopic = "http-on-opening-request"; |
| 408 if (Services.vc.compare(Utils.platformVersion, "18.0") < 0) | 408 if (Services.vc.compare(Utils.platformVersion, "18.0") < 0) |
| 409 httpTopic = "http-on-modify-request"; | 409 httpTopic = "http-on-modify-request"; |
| 410 | 410 |
| 411 Services.obs.addObserver(this, httpTopic, true); | 411 Services.obs.addObserver(this, httpTopic, true); |
| 412 Services.obs.addObserver(this, "content-document-global-created", true); | 412 Services.obs.addObserver(this, "content-document-global-created", true); |
| 413 | 413 |
| 414 onShutdown.add(function() | 414 onShutdown.add(function() |
| 415 { | 415 { |
| 416 // Our category observers should be removed before changing category | |
| 417 // memberships, just in case. | |
| 418 Services.obs.removeObserver(this, httpTopic); | 416 Services.obs.removeObserver(this, httpTopic); |
| 419 Services.obs.removeObserver(this, "content-document-global-created"); | 417 Services.obs.removeObserver(this, "content-document-global-created"); |
| 420 | 418 |
| 421 for (let category of this.xpcom_categories) | 419 for (let category of this.xpcom_categories) |
| 422 catMan.deleteCategoryEntry(category, this.contractID, false); | 420 catMan.deleteCategoryEntry(category, this.contractID, false); |
| 423 | 421 |
| 424 // This needs to run asynchronously, see bug 753687 | 422 // This needs to run asynchronously, see bug 753687 |
| 425 Utils.runAsync(function() | 423 Utils.runAsync(function() |
| 426 { | 424 { |
| 427 registrar.unregisterFactory(this.classID, this); | 425 registrar.unregisterFactory(this.classID, this); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 if (!wnd || wnd.closed) | 802 if (!wnd || wnd.closed) |
| 805 return; | 803 return; |
| 806 | 804 |
| 807 if (entry.type == Policy.type.OBJECT) | 805 if (entry.type == Policy.type.OBJECT) |
| 808 { | 806 { |
| 809 node.removeEventListener("mouseover", objectMouseEventHander, true); | 807 node.removeEventListener("mouseover", objectMouseEventHander, true); |
| 810 node.removeEventListener("mouseout", objectMouseEventHander, true); | 808 node.removeEventListener("mouseout", objectMouseEventHander, true); |
| 811 } | 809 } |
| 812 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; | 810 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; |
| 813 } | 811 } |
| LEFT | RIGHT |