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

Unified Diff: lib/child/contextMenu.js

Issue 29333334: Issue 3494 - Update buildtools dependency for adblockplus to revision 4d73b9c76e34 (disable E10S co… (Closed)
Patch Set: Created Jan. 8, 2016, 4:51 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/child/contentPolicy.js ('k') | lib/child/elemHide.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/child/contextMenu.js
===================================================================
--- a/lib/child/contextMenu.js
+++ b/lib/child/contextMenu.js
@@ -124,16 +124,14 @@ let ContextMenuObserver =
subject = subject.wrappedJSObject;
if (subject.addonInfo)
subject.addonInfo.adblockplus = getContextInfo(subject.event);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObserver])
};
-let addObserver = Utils.getPropertyWithoutCompatShims(Services.obs, "addObserver");
-addObserver.call(Services.obs, ContextMenuObserver, "content-contextmenu", true);
-addObserver.call(Services.obs, ContextMenuObserver, "AdblockPlus:content-contextmenu", true);
+Services.obs.addObserver(ContextMenuObserver, "content-contextmenu", true);
+Services.obs.addObserver(ContextMenuObserver, "AdblockPlus:content-contextmenu", true);
onShutdown.add(() => {
- let removeObserver = Utils.getPropertyWithoutCompatShims(Services.obs, "removeObserver");
- removeObserver.call(Services.obs, ContextMenuObserver, "content-contextmenu");
- removeObserver.call(Services.obs, ContextMenuObserver, "AdblockPlus:content-contextmenu");
+ Services.obs.removeObserver(ContextMenuObserver, "content-contextmenu");
+ Services.obs.removeObserver(ContextMenuObserver, "AdblockPlus:content-contextmenu");
});
« no previous file with comments | « lib/child/contentPolicy.js ('k') | lib/child/elemHide.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld