fx-compat: XPCOMUtils.generateQI() → ChromeUtils.generateQI()
This commit is contained in:
parent
4d35cdf095
commit
ccbc785499
8 changed files with 12 additions and 17 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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]);
|
|
@ -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])
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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])
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue