diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index 92fb00241b..ce29e7ad4d 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -323,8 +323,8 @@ Zotero.HTTP = new function() { // Don't follow redirects if (options.followRedirects === false) { channel.notificationCallbacks = { - QueryInterface: XPCOMUtils.generateQI([Ci.nsIInterfaceRequestor, Ci.nsIChannelEventSync]), - getInterface: XPCOMUtils.generateQI([Ci.nsIChannelEventSink]), + QueryInterface: ChromeUtils.generateQI([Ci.nsIInterfaceRequestor, Ci.nsIChannelEventSync]), + getInterface: ChromeUtils.generateQI([Ci.nsIChannelEventSink]), asyncOnChannelRedirect: function (oldChannel, newChannel, flags, callback) { redirectStatus = (flags & Ci.nsIChannelEventSink.REDIRECT_PERMANENT) ? 301 : 302; redirectLocation = newChannel.URI.spec; diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 7283a572f2..27c509e71a 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -3483,7 +3483,7 @@ Zotero.Integration.LegacyPluginWrapper.wrapDocument = function wrapDocument(doc) deferred.reject(data); deferred = null; } - }, QueryInterface:XPCOMUtils.generateQI([Components.interfaces.nsIObserver, Components.interfaces.nsISupports])}); + }, QueryInterface:ChromeUtils.generateQI([Components.interfaces.nsIObserver])}); return promise; } else { var result = doc.getFields.apply(doc, arguments); diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index da4f71f7f0..312d754505 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1826,7 +1826,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); * @namespace */ var ConsoleListener = { - "QueryInterface":XPCOMUtils.generateQI([Components.interfaces.nsIConsoleMessage, + "QueryInterface":ChromeUtils.generateQI([Components.interfaces.nsIConsoleMessage, Components.interfaces.nsISupports]), "observe":function(msg) { if(!_shouldKeepError(msg)) return; diff --git a/components/zotero-autocomplete.js b/components/zotero-autocomplete.js index 1fea263415..cf2bd8f26e 100644 --- a/components/zotero-autocomplete.js +++ b/components/zotero-autocomplete.js @@ -356,9 +356,9 @@ ZoteroAutoComplete.prototype.stopSearch = function(){ ZoteroAutoComplete.prototype.classDescription = ZOTERO_AC_CLASSNAME; ZoteroAutoComplete.prototype.classID = ZOTERO_AC_CID; ZoteroAutoComplete.prototype.contractID = ZOTERO_AC_CONTRACTID; -ZoteroAutoComplete.prototype.QueryInterface = XPCOMUtils.generateQI([ +ZoteroAutoComplete.prototype.QueryInterface = ChromeUtils.generateQI([ Components.interfaces.nsIAutoCompleteSearch, - Components.interfaces.nsIAutoCompleteObserver, - Components.interfaces.nsISupports]); + Components.interfaces.nsIAutoCompleteObserver +]); var NSGetFactory = XPCOMUtils.generateNSGetFactory([ZoteroAutoComplete]); \ No newline at end of file diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js index d45872c727..4d3e8d5ae3 100644 --- a/components/zotero-protocol-handler.js +++ b/components/zotero-protocol-handler.js @@ -1330,8 +1330,7 @@ ZoteroProtocolHandler.prototype = { contractID: ZOTERO_PROTOCOL_CONTRACTID, classDescription: ZOTERO_PROTOCOL_NAME, classID: ZOTERO_PROTOCOL_CID, - QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsISupports, - Components.interfaces.nsIProtocolHandler]) + QueryInterface: ChromeUtils.generateQI([Components.interfaces.nsIProtocolHandler]) }; diff --git a/components/zotero-service.js b/components/zotero-service.js index 3f26c9a105..8e02de4916 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -438,13 +438,11 @@ function ZoteroService() { throw e; } } - ZoteroService.prototype = { contractID: '@zotero.org/Zotero;1', classDescription: 'Zotero', classID: Components.ID('{e4c61080-ec2d-11da-8ad9-0800200c9a66}'), - QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsISupports, - Components.interfaces.nsIProtocolHandler]) + QueryInterface: ChromeUtils.generateQI([]) } function addInitCallback(callback) { @@ -657,8 +655,7 @@ ZoteroCommandLineHandler.prototype = { classID: Components.ID("{531828f8-a16c-46be-b9aa-14845c3b010f}"), service: true, _xpcom_categories: [{category:"command-line-handler", entry:"m-zotero"}], - QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsICommandLineHandler, - Components.interfaces.nsISupports]) + QueryInterface: ChromeUtils.generateQI([Components.interfaces.nsICommandLineHandler]) }; var NSGetFactory = XPCOMUtils.generateNSGetFactory([ZoteroService, ZoteroCommandLineHandler]); diff --git a/resource/loader.jsm b/resource/loader.jsm index f26bcaea8a..5250966ad1 100644 --- a/resource/loader.jsm +++ b/resource/loader.jsm @@ -281,7 +281,7 @@ const urlCache = { } }), - QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference]), + QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference]), observe() { // Clear any module resolution caches when the startup cache is flushed, diff --git a/test/components/zotero-unit.js b/test/components/zotero-unit.js index bfe8a7424a..cb703212cd 100644 --- a/test/components/zotero-unit.js +++ b/test/components/zotero-unit.js @@ -52,8 +52,7 @@ ZoteroUnit.prototype = { classID: Components.ID("{b8570031-be5e-46e8-9785-38cd50a5d911}"), service: true, _xpcom_categories: [{category:"command-line-handler", entry:"m-zotero-unit"}], - QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsICommandLineHandler, - Components.interfaces.nsISupports]) + QueryInterface: ChromeUtils.generateQI([Components.interfaces.nsICommandLineHandler]) };