| Index: lib/child/contentPolicy.js |
| =================================================================== |
| --- a/lib/child/contentPolicy.js |
| +++ b/lib/child/contentPolicy.js |
| @@ -241,27 +241,24 @@ var PolicyImplementation = |
| for (let name in iface) |
| if (name.indexOf("TYPE_") == 0 && name != "TYPE_DATAREQUEST") |
| types.set(iface[name], name.substr(5)); |
| let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); |
| registrar.registerFactory(this.classID, this.classDescription, this.contractID, this); |
| let catMan = Utils.categoryManager; |
| - let addCategoryEntry = Utils.getPropertyWithoutCompatShims(catMan, "addCategoryEntry"); |
| for (let category of this.xpcom_categories) |
| - addCategoryEntry.call(catMan, category, this.contractID, this.contractID, false, true); |
| + catMan.addCategoryEntry(category, this.contractID, this.contractID, false, true); |
| - let addObserver = Utils.getPropertyWithoutCompatShims(Services.obs, "addObserver"); |
| - addObserver.call(Services.obs, this, "content-document-global-created", true); |
| + Services.obs.addObserver(this, "content-document-global-created", true); |
| onShutdown.add(() => |
| { |
| - let removeObserver = Utils.getPropertyWithoutCompatShims(Services.obs, "removeObserver"); |
| - removeObserver.call(Services.obs, this, "content-document-global-created"); |
| + Services.obs.removeObserver(this, "content-document-global-created"); |
| for (let category of this.xpcom_categories) |
| catMan.deleteCategoryEntry(category, this.contractID, false); |
| registrar.unregisterFactory(this.classID, this); |
| }); |
| }, |