Index: lib/contentPolicy.js |
=================================================================== |
--- a/lib/contentPolicy.js |
+++ b/lib/contentPolicy.js |
@@ -405,27 +405,23 @@ var PolicyImplementation = |
// http-on-opening-request is new in Gecko 18, http-on-modify-request can |
// be used in earlier releases. |
let httpTopic = "http-on-opening-request"; |
if (Services.vc.compare(Utils.platformVersion, "18.0") < 0) |
httpTopic = "http-on-modify-request"; |
Services.obs.addObserver(this, httpTopic, true); |
Services.obs.addObserver(this, "content-document-global-created", true); |
- Services.obs.addObserver(this, "xpcom-category-entry-removed", true); |
- Services.obs.addObserver(this, "xpcom-category-cleared", true); |
onShutdown.add(function() |
{ |
// Our category observers should be removed before changing category |
// memberships, just in case. |
Services.obs.removeObserver(this, httpTopic); |
Services.obs.removeObserver(this, "content-document-global-created"); |
- Services.obs.removeObserver(this, "xpcom-category-entry-removed"); |
- Services.obs.removeObserver(this, "xpcom-category-cleared"); |
for (let category of this.xpcom_categories) |
catMan.deleteCategoryEntry(category, this.contractID, false); |
// This needs to run asynchronously, see bug 753687 |
Utils.runAsync(function() |
{ |
registrar.unregisterFactory(this.classID, this); |
@@ -539,35 +535,16 @@ var PolicyImplementation = |
this.observe(wnd, "content-document-global-created", null, subject.URI); |
if (subject instanceof Ci.nsIWritablePropertyBag) |
subject.setProperty("abpRequestType", Policy.type.POPUP); |
} |
} |
break; |
} |
- case "xpcom-category-entry-removed": |
- case "xpcom-category-cleared": |
- { |
- let category = data; |
- if (this.xpcom_categories.indexOf(category) < 0) |
- return; |
- |
- if (topic == "xpcom-category-entry-removed" && |
- subject instanceof Ci.nsISupportsCString && |
- subject.data != this.contractID) |
- { |
- return; |
- } |
- |
- // Our category entry was removed, make sure to add it back |
- let catMan = Utils.categoryManager; |
- catMan.addCategoryEntry(category, this.contractID, this.contractID, false, true); |
- break; |
- } |
} |
}, |
// |
// nsIChannelEventSink interface implementation |
// |
asyncOnChannelRedirect: function(oldChannel, newChannel, flags, callback) |