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

Delta Between Two Patch Sets: lib/contentPolicy.js

Issue 29329390: Issue 3208 - Stop watching category removals (Closed)
Left Patch Set: Created Oct. 26, 2015, 7:58 p.m.
Right Patch Set: Removed comment as well Created Oct. 26, 2015, 8:33 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 | no next file » | 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld