зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
This commit is contained in:
Родитель
8d808a0da4
Коммит
9d78661f88
|
@ -125,7 +125,7 @@ var gDataNotificationInfoBar = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
|
|
@ -40,9 +40,9 @@ var FullZoom = {
|
|||
// nsISupports
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsIContentPrefObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsIContentPrefObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
// Initialization & Destruction
|
||||
|
|
|
@ -2029,7 +2029,7 @@ var BookmarkingUI = {
|
|||
this._uninitView();
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsINavBookmarkObserver"]),
|
||||
};
|
||||
|
||||
var AutoShowBookmarksToolbar = {
|
||||
|
|
|
@ -1468,7 +1468,7 @@ var gSync = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
|
|
@ -2648,7 +2648,7 @@ const SiteSpecificBrowserUI = {
|
|||
document.getElementById("appMenu-ssb-button").hidden = false;
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference"]),
|
||||
};
|
||||
|
||||
function HandleAppCommandEvent(evt) {
|
||||
|
@ -5920,7 +5920,7 @@ var TabsProgressListener = {
|
|||
function nsBrowserAccess() {}
|
||||
|
||||
nsBrowserAccess.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserDOMWindow]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIBrowserDOMWindow"]),
|
||||
|
||||
_openURIInNewTab(
|
||||
aURI,
|
||||
|
@ -8431,8 +8431,8 @@ var RestoreLastSessionObserver = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -180,9 +180,9 @@ var RefreshBlocker = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener2,
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener2",
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
}
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference])
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
|
||||
"nsISupportsWeakReference"])
|
||||
};
|
||||
|
||||
frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
}
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference])
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
|
||||
"nsISupportsWeakReference"])
|
||||
};
|
||||
|
||||
frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
|
|
|
@ -25,7 +25,7 @@ var fakePromptServiceFactory = {
|
|||
};
|
||||
|
||||
var promptService = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIPromptService"]),
|
||||
alert() {
|
||||
didFail = true;
|
||||
},
|
||||
|
|
|
@ -362,5 +362,5 @@ WindowListener.prototype = {
|
|||
domwindow.addEventListener("load", onLoad, true);
|
||||
},
|
||||
onCloseWindow(aXULWindow) {},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowMediatorListener]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIWindowMediatorListener"]),
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@ add_task(async function() {
|
|||
|
||||
let setHomepagePromise = new Promise(function(resolve) {
|
||||
let observer = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
observe(subject, topic, data) {
|
||||
is(topic, "nsPref:changed", "observed correct topic");
|
||||
is(data, HOMEPAGE_PREF, "observed correct data");
|
||||
|
|
|
@ -295,7 +295,7 @@ function mockPromptService() {
|
|||
let promptService = {
|
||||
// The prompt returns 1 for cancelled and 0 for accepted.
|
||||
_response: 0,
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIPromptService"]),
|
||||
confirmEx: () => promptService._response,
|
||||
};
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ async function recordReflows(testPromise, win = window) {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIReflowObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIReflowObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ var BlocklistProxy = {
|
|||
_uuid: null,
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsIBlocklistService,
|
||||
Ci.nsITimerCallback,
|
||||
"nsIObserver",
|
||||
"nsIBlocklistService",
|
||||
"nsITimerCallback",
|
||||
]),
|
||||
|
||||
init() {
|
||||
|
|
|
@ -22,8 +22,8 @@ add_task(async function() {
|
|||
onStatusChange() {},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
browser.addProgressListener(progressListener, Ci.nsIWebProgress.NOTIFY_ALL);
|
||||
|
|
|
@ -129,7 +129,7 @@ add_task(async function() {
|
|||
);
|
||||
// Configure Firefox to use the proxy.
|
||||
let systemProxySettings = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsISystemProxySettings]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsISystemProxySettings"]),
|
||||
mainThreadOnly: true,
|
||||
PACURI: null,
|
||||
getProxyForURI: (aSpec, aScheme, aHost, aPort) => {
|
||||
|
|
|
@ -56,7 +56,7 @@ AboutModule.prototype = {
|
|||
return null;
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAboutModule"]),
|
||||
};
|
||||
|
||||
var AboutModuleFactory = {
|
||||
|
@ -71,7 +71,7 @@ var AboutModuleFactory = {
|
|||
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIFactory"]),
|
||||
};
|
||||
|
||||
add_task(async function init() {
|
||||
|
|
|
@ -383,10 +383,10 @@ function nsBrowserContentHandler() {
|
|||
nsBrowserContentHandler.prototype = {
|
||||
/* nsISupports */
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsICommandLineHandler,
|
||||
Ci.nsIBrowserHandler,
|
||||
Ci.nsIContentHandler,
|
||||
Ci.nsICommandLineValidator,
|
||||
"nsICommandLineHandler",
|
||||
"nsIBrowserHandler",
|
||||
"nsIContentHandler",
|
||||
"nsICommandLineValidator",
|
||||
]),
|
||||
|
||||
/* nsICommandLineHandler */
|
||||
|
|
|
@ -4169,8 +4169,8 @@ BrowserGlue.prototype = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
@ -4452,7 +4452,7 @@ function ContentPermissionPrompt() {}
|
|||
ContentPermissionPrompt.prototype = {
|
||||
classID: Components.ID("{d8903bf6-68d5-4e97-bcd1-e4d3012f721a}"),
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionPrompt]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionPrompt"]),
|
||||
|
||||
/**
|
||||
* This implementation of nsIContentPermissionPrompt.prompt ensures
|
||||
|
@ -4873,8 +4873,8 @@ var JawsScreenReaderVersionCheck = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
observe(subject, topic, data) {
|
||||
|
@ -5722,8 +5722,8 @@ var AboutHomeStartupCache = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsICacheEntryOpenallback,
|
||||
Ci.nsIObserver,
|
||||
"nsICacheEntryOpenallback",
|
||||
"nsIObserver",
|
||||
]),
|
||||
|
||||
/** MessageListener **/
|
||||
|
|
|
@ -141,9 +141,7 @@ class DNSLookup {
|
|||
}
|
||||
}
|
||||
|
||||
DNSLookup.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIDNSListener,
|
||||
]);
|
||||
DNSLookup.prototype.QueryInterface = ChromeUtils.generateQI(["nsIDNSListener"]);
|
||||
|
||||
// A wrapper around a single set of measurements. The required lookups are
|
||||
// triggered and the results aggregated before telemetry is sent. If aborted,
|
||||
|
|
|
@ -196,8 +196,8 @@ const TELEMETRY_EVENT_CATEGORY = "downloads";
|
|||
|
||||
var PrefObserver = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
getPref(name) {
|
||||
try {
|
||||
|
|
|
@ -2195,7 +2195,7 @@ let ChromeURLBlockPolicy = {
|
|||
classDescription: "Policy Engine Content Policy",
|
||||
contractID: "@mozilla-org/policy-engine-content-policy-service;1",
|
||||
classID: Components.ID("{ba7b9118-cabc-4845-8b26-4215d2a59ed7}"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPolicy]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIContentPolicy"]),
|
||||
createInstance(outer, iid) {
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
|
|
@ -87,8 +87,8 @@ function WebsiteFilter(blocklist, exceptionlist) {
|
|||
|
||||
WebsiteFilter.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
observe(subject, topic, data) {
|
||||
|
|
|
@ -1457,7 +1457,7 @@ this.tabs = class extends ExtensionAPI {
|
|||
}
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
"nsIWebProgressListener",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ add_task(async function browseraction_contextmenu_remove_extension() {
|
|||
let { prompt } = Services;
|
||||
let promptService = {
|
||||
_response: 1,
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIPromptService"]),
|
||||
confirmEx: function(...args) {
|
||||
promptService._confirmExArgs = args;
|
||||
return promptService._response;
|
||||
|
|
|
@ -64,7 +64,7 @@ InstallerPrefs.prototype = {
|
|||
classID: Components.ID("{cd8a6995-1f19-4cdd-9ed1-d6263302f594}"),
|
||||
contractID: "@mozilla.org/installerprefs;1",
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
|
|
|
@ -126,7 +126,7 @@ function getL10n() {
|
|||
* 6. For startup-only migrators, override |startupOnlyMigrator|.
|
||||
*/
|
||||
var MigratorPrototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIBrowserProfileMigrator"]),
|
||||
|
||||
/**
|
||||
* OVERRIDE IF AND ONLY IF the source supports multiple profiles.
|
||||
|
|
|
@ -12,7 +12,7 @@ function ProfileMigrator() {}
|
|||
|
||||
ProfileMigrator.prototype = {
|
||||
migrate: MigrationUtils.startupMigration.bind(MigrationUtils),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIProfileMigrator]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIProfileMigrator"]),
|
||||
classDescription: "Profile Migrator",
|
||||
contractID: "@mozilla.org/toolkit/profile-migrator;1",
|
||||
classID: Components.ID("6F8BB968-C14F-4D6F-9733-6C6737B35DCE"),
|
||||
|
|
|
@ -311,8 +311,8 @@ class BaseAboutNewTabService {
|
|||
|
||||
this.classID = Components.ID("{cb36c925-3adc-49b3-b720-a5cc49d8a40e}");
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIAboutNewTabService,
|
||||
Ci.nsIObserver,
|
||||
"nsIAboutNewTabService",
|
||||
"nsIObserver",
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,8 +84,8 @@ class AboutWelcomeChild extends JSWindowActorChild {
|
|||
|
||||
const listener = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class Observer {
|
|||
this.dispatch = dispatch;
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
observerInterface,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ function PaymentUIService() {
|
|||
|
||||
PaymentUIService.prototype = {
|
||||
classID: Components.ID("{01f8bd55-9017-438b-85ec-7c15d2b35cdc}"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIPaymentUIService"]),
|
||||
|
||||
// nsIPaymentUIService implementation:
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ var paymentDialogWrapper = {
|
|||
temporaryStore: null,
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
/**
|
||||
|
|
|
@ -94,7 +94,7 @@ PlacesController.prototype = {
|
|||
// actually organising the trees.
|
||||
disableUserActions: false,
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIClipboardOwner]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIClipboardOwner"]),
|
||||
|
||||
// nsIClipboardOwner
|
||||
LosingOwnership: function PC_LosingOwnership(aXferable) {
|
||||
|
|
|
@ -511,7 +511,7 @@ var gEditItemOverlay = {
|
|||
}
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsINavBookmarkObserver"]),
|
||||
|
||||
_element(aID) {
|
||||
return document.getElementById("editBMPanel_" + aID);
|
||||
|
|
|
@ -51,9 +51,9 @@ PlacesTreeView.prototype = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsITreeView,
|
||||
Ci.nsINavHistoryResultObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsITreeView",
|
||||
"nsINavHistoryResultObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@ add_task(async function() {
|
|||
PlacesUtils.bookmarks.removeObserver(this);
|
||||
resolve({ property, value });
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsINavBookmarkObserver"]),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ add_task(async function test() {
|
|||
var bookmarksObserver = {
|
||||
_notifications: [],
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsINavBookmarkObserver"]),
|
||||
|
||||
handlePlacesEvents(events) {
|
||||
for (let { type, parentGuid, guid, index } of events) {
|
||||
|
|
|
@ -71,7 +71,7 @@ Tree.prototype = {
|
|||
getCellProperties(row, column) {
|
||||
return "";
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsITreeView"]),
|
||||
};
|
||||
|
||||
function Lang(aCode, label) {
|
||||
|
|
|
@ -1889,7 +1889,7 @@ var gMainPane = {
|
|||
|
||||
// nsISupports
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
// nsIObserver
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ const mockUpdateManager = {
|
|||
|
||||
_originalClassId: "",
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIUpdateManager]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIUpdateManager"]),
|
||||
|
||||
createInstance(outer, iiD) {
|
||||
if (outer) {
|
||||
|
|
|
@ -81,5 +81,5 @@ PromptCollection.prototype.classID = Components.ID(
|
|||
"{7913837c-9623-11ea-bb37-0242ac130002}"
|
||||
);
|
||||
PromptCollection.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIPromptCollection,
|
||||
"nsIPromptCollection",
|
||||
]);
|
||||
|
|
|
@ -175,5 +175,5 @@ WebProtocolHandlerRegistrar.prototype = {
|
|||
/**
|
||||
* See nsISupports
|
||||
*/
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProtocolHandlerRegistrar]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIWebProtocolHandlerRegistrar"]),
|
||||
};
|
||||
|
|
|
@ -126,8 +126,8 @@ class SearchOneOffs {
|
|||
|
||||
// Add weak referenced observers to invalidate our cached list of engines.
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
Services.prefs.addObserver("browser.search.hiddenOneOffs", this, true);
|
||||
Services.obs.addObserver(this, "browser-search-engine-modified", true);
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
searchbar.updateDisplay();
|
||||
}
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
};
|
||||
|
||||
this._ignoreFocus = false;
|
||||
|
|
|
@ -451,8 +451,8 @@ function HistoryListener(docShell, callback) {
|
|||
}
|
||||
HistoryListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
uninstall() {
|
||||
|
@ -511,8 +511,8 @@ function ProgressListener(docShell, callbacks) {
|
|||
|
||||
ProgressListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
uninstall() {
|
||||
|
|
|
@ -258,9 +258,9 @@ class SessionHistoryListener extends Handler {
|
|||
}
|
||||
}
|
||||
SessionHistoryListener.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
|
||||
/**
|
||||
|
|
|
@ -421,7 +421,7 @@ var SessionStartup = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
|
|
@ -546,8 +546,8 @@ Object.freeze(SessionStore);
|
|||
|
||||
var SessionStoreInternal = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
_globalState: new GlobalState(),
|
||||
|
@ -1005,8 +1005,8 @@ var SessionStoreInternal = {
|
|||
}
|
||||
SHistoryListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
notifySHistoryChanges(index) {
|
||||
|
@ -1124,8 +1124,8 @@ var SessionStoreInternal = {
|
|||
}
|
||||
SHistoryListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
uninstall() {
|
||||
|
|
|
@ -63,8 +63,8 @@ function promiseNewLocationAndHistoryEntryReplaced(tab, snippet) {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ var idleService = {
|
|||
}
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIIdleService]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIIdleService"]),
|
||||
idleTime: 19999,
|
||||
|
||||
addIdleObserver(observer, time) {
|
||||
|
|
|
@ -11,7 +11,7 @@ const TESTCLASSID = "78742c04-3630-448c-9be3-6c5070f062de";
|
|||
const TESTURL = "about:testpageforsessionrestore#foo";
|
||||
|
||||
let TestAboutPage = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAboutModule"]),
|
||||
getURIFlags(aURI) {
|
||||
// No CAN_ or MUST_LOAD_IN_CHILD means this loads in the parent:
|
||||
return (
|
||||
|
|
|
@ -675,8 +675,8 @@ function promiseOnHistoryReplaceEntryInChild(browser) {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -904,5 +904,5 @@ class SSBCommandLineHandler {
|
|||
}
|
||||
|
||||
SSBCommandLineHandler.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsICommandLineHandler,
|
||||
"nsICommandLineHandler",
|
||||
]);
|
||||
|
|
|
@ -91,8 +91,8 @@ class ProgressListener {
|
|||
}
|
||||
|
||||
ProgressListener.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
|
||||
class BrowserDOMWindow {
|
||||
|
@ -255,7 +255,7 @@ class BrowserDOMWindow {
|
|||
}
|
||||
|
||||
BrowserDOMWindow.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIBrowserDOMWindow,
|
||||
"nsIBrowserDOMWindow",
|
||||
]);
|
||||
|
||||
window.addEventListener("DOMContentLoaded", init, true);
|
||||
|
|
|
@ -31,7 +31,7 @@ function MockContentPermissionType(type) {
|
|||
}
|
||||
|
||||
MockContentPermissionType.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionType]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionType"]),
|
||||
// We expose the wrappedJSObject so that we can be sure
|
||||
// in some of our tests that we're passing the right
|
||||
// nsIContentPermissionType around.
|
||||
|
@ -54,7 +54,7 @@ function MockContentPermissionRequest(typesArray) {
|
|||
}
|
||||
|
||||
MockContentPermissionRequest.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionRequest]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionRequest"]),
|
||||
// We expose the wrappedJSObject so that we can be sure
|
||||
// in some of our tests that we're passing the right
|
||||
// nsIContentPermissionRequest around.
|
||||
|
|
|
@ -154,7 +154,7 @@ function constructOnePageCmdLine(aURL) {
|
|||
return Services.io.newURI(this._arg);
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLine]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsICommandLine"]),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function startupRecorder() {
|
|||
startupRecorder.prototype = {
|
||||
classID: Components.ID("{11c095b2-e42e-4bdf-9dd0-aed87595f6a4}"),
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
record(name) {
|
||||
ChromeUtils.addProfilerMarker("startupRecorder:" + name);
|
||||
|
|
|
@ -499,7 +499,7 @@ const helperProto = TouchBarHelper.prototype;
|
|||
helperProto.classDescription = "Services the Mac Touch Bar";
|
||||
helperProto.classID = Components.ID("{ea109912-3acc-48de-b679-c23b6a122da5}");
|
||||
helperProto.contractID = "@mozilla.org/widget/touchbarhelper;1";
|
||||
helperProto.QueryInterface = ChromeUtils.generateQI([Ci.nsITouchBarHelper]);
|
||||
helperProto.QueryInterface = ChromeUtils.generateQI(["nsITouchBarHelper"]);
|
||||
helperProto._l10n = new Localization(["browser/touchbar/touchbar.ftl"]);
|
||||
|
||||
/**
|
||||
|
@ -639,7 +639,7 @@ const inputProto = TouchBarInput.prototype;
|
|||
inputProto.classDescription = "Represents an input on the Mac Touch Bar";
|
||||
inputProto.classID = Components.ID("{77441d17-f29c-49d7-982f-f20a5ab5a900}");
|
||||
inputProto.contractID = "@mozilla.org/widget/touchbarinput;1";
|
||||
inputProto.QueryInterface = ChromeUtils.generateQI([Ci.nsITouchBarInput]);
|
||||
inputProto.QueryInterface = ChromeUtils.generateQI(["nsITouchBarInput"]);
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
|
||||
TouchBarHelper,
|
||||
|
|
|
@ -12,7 +12,7 @@ Services.scriptloader.loadSubScript(
|
|||
|
||||
function MockShellService() {}
|
||||
MockShellService.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIShellService]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIShellService"]),
|
||||
isDefaultBrowser(aStartupCheck, aForAllTypes) {
|
||||
return false;
|
||||
},
|
||||
|
|
|
@ -211,8 +211,8 @@ class Preferences {
|
|||
constructor() {
|
||||
this._map = new Map();
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
Services.prefs.addObserver(PREF_URLBAR_BRANCH, this, true);
|
||||
for (let pref of PREF_OTHER_DEFAULTS.keys()) {
|
||||
|
|
|
@ -24,8 +24,8 @@ class SearchUtils {
|
|||
constructor() {
|
||||
this._refreshEnginesByAliasPromise = Promise.resolve();
|
||||
this.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ const clientAuthDialogs = {
|
|||
return true;
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIClientAuthDialogs]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIClientAuthDialogs"]),
|
||||
};
|
||||
|
||||
function startServer(cert) {
|
||||
|
|
|
@ -145,7 +145,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
classID: Components.ID("4f9f1e4c-7f2c-439e-9c9e-566b68bc187d"),
|
||||
contractID: "@mozilla.org/autocomplete/search;1?name=autofill-profiles",
|
||||
classDescription: "AutofillProfileAutoCompleteSearch",
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteSearch"]),
|
||||
|
||||
// Begin nsIAutoCompleteSearch implementation
|
||||
|
||||
|
@ -310,7 +310,7 @@ AutofillProfileAutoCompleteSearch.prototype = {
|
|||
};
|
||||
|
||||
let ProfileAutocomplete = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
lastProfileAutoCompleteResult: null,
|
||||
lastProfileAutoCompleteFocusedInput: null,
|
||||
|
|
|
@ -43,7 +43,7 @@ class ProfileAutoCompleteResult {
|
|||
log.debug("Constructing new ProfileAutoCompleteResult:", [...arguments]);
|
||||
|
||||
// nsISupports
|
||||
this.QueryInterface = ChromeUtils.generateQI([Ci.nsIAutoCompleteResult]);
|
||||
this.QueryInterface = ChromeUtils.generateQI(["nsIAutoCompleteResult"]);
|
||||
|
||||
// The user's query string
|
||||
this.searchString = searchString;
|
||||
|
|
|
@ -17,7 +17,7 @@ function AboutCompat() {
|
|||
);
|
||||
}
|
||||
AboutCompat.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAboutModule"]),
|
||||
getURIFlags() {
|
||||
return Ci.nsIAboutModule.URI_MUST_LOAD_IN_EXTENSION_PROCESS;
|
||||
},
|
||||
|
|
|
@ -96,8 +96,8 @@ function setupBrowser() {
|
|||
browser.addProgressListener(
|
||||
{
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
// When URL changes, update the URL in the URL bar and update
|
||||
|
|
|
@ -26,8 +26,8 @@ const BROWSER_READY_NOTIFICATION = "sessionstore-windows-restored";
|
|||
|
||||
const AboutNewTab = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
// AboutNewTab
|
||||
|
|
|
@ -414,8 +414,8 @@ let URICountListener = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
@ -463,8 +463,8 @@ let BrowserUsageTelemetry = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
uninit() {
|
||||
|
|
|
@ -341,8 +341,8 @@ var Sanitizer = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
// This method is meant to be used by tests.
|
||||
|
|
|
@ -116,8 +116,8 @@ var SiteDataManager = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsICacheStorageConsumptionObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsICacheStorageConsumptionObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -186,8 +186,8 @@ const GloballyBlockedPermissions = {
|
|||
browser.addProgressListener(
|
||||
{
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
let hasLeftPage =
|
||||
|
|
|
@ -31,8 +31,8 @@ var TabUnloader = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ XPCOMUtils.defineLazyGetter(this, "gHistoryObserver", function() {
|
|||
onDeleteURI() {},
|
||||
onPageChanged() {},
|
||||
onDeleteVisits() {},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsINavHistoryObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ function PreviewController(win, tab) {
|
|||
}
|
||||
|
||||
PreviewController.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsITaskbarPreviewController]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsITaskbarPreviewController"]),
|
||||
|
||||
destroy() {
|
||||
this.tab.removeEventListener("TabAttrModified", this);
|
||||
|
@ -904,9 +904,9 @@ var AeroPeek = {
|
|||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.nsINavHistoryObserver,
|
||||
Ci.nsIObserver,
|
||||
"nsISupportsWeakReference",
|
||||
"nsINavHistoryObserver",
|
||||
"nsIObserver",
|
||||
]),
|
||||
};
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ function browserLocationChanged(browser) {
|
|||
}
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsIWebProgressListener2,
|
||||
"nsIWebProgressListener",
|
||||
"nsIWebProgressListener2",
|
||||
]),
|
||||
};
|
||||
const filter = Cc[
|
||||
|
|
|
@ -58,7 +58,7 @@ function checkPopupHide() {
|
|||
}
|
||||
|
||||
var gObserver = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIFormSubmitObserver"]),
|
||||
|
||||
notifyInvalidSubmit(aFormElement, aInvalidElements) {},
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ let typeInSearchField = async function(browser, text, fieldName) {
|
|||
function makeMockPermissionRequest(browser) {
|
||||
let type = {
|
||||
options: Cc["@mozilla.org/array;1"].createInstance(Ci.nsIArray),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionType]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionType"]),
|
||||
};
|
||||
let types = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
|
||||
types.appendElement(type);
|
||||
|
@ -103,7 +103,7 @@ function makeMockPermissionRequest(browser) {
|
|||
getDelegatePrincipal(aType) {
|
||||
return principal;
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionRequest]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIContentPermissionRequest"]),
|
||||
};
|
||||
|
||||
// In the e10s-case, nsIContentPermissionRequest will have
|
||||
|
|
|
@ -20,7 +20,7 @@ ProtocolHandler.prototype = {
|
|||
newChannel() {
|
||||
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIProtocolHandler]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIProtocolHandler"]),
|
||||
};
|
||||
|
||||
var testProtocols = [
|
||||
|
|
|
@ -63,5 +63,5 @@ class Sniffer {
|
|||
}
|
||||
|
||||
Sniffer.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIContentSniffer,
|
||||
"nsIContentSniffer",
|
||||
]);
|
||||
|
|
|
@ -49,9 +49,9 @@ function Converter() {}
|
|||
|
||||
Converter.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIStreamConverter,
|
||||
Ci.nsIStreamListener,
|
||||
Ci.nsIRequestObserver,
|
||||
"nsIStreamConverter",
|
||||
"nsIStreamListener",
|
||||
"nsIRequestObserver",
|
||||
]),
|
||||
|
||||
get wrappedJSObject() {
|
||||
|
|
|
@ -72,14 +72,14 @@ add_task(async function test_converter_abort_should_stop_data_sending() {
|
|||
// Stub all the things.
|
||||
const chan = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIChannel,
|
||||
Ci.nsIWritablePropertyBag,
|
||||
"nsIChannel",
|
||||
"nsIWritablePropertyBag",
|
||||
]),
|
||||
URI: Services.io.newURI("data:application/json,{}"),
|
||||
// loadinfo is builtinclass, need to actually have one:
|
||||
loadInfo,
|
||||
notificationCallbacks: {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIInterfaceRequestor]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIInterfaceRequestor"]),
|
||||
getInterface() {
|
||||
// We want a loadcontext here, which is also builtinclass, can't stub.
|
||||
return docShell;
|
||||
|
@ -90,7 +90,7 @@ add_task(async function test_converter_abort_should_stop_data_sending() {
|
|||
};
|
||||
let onStartFired = false;
|
||||
const listener = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIStreamListener"]),
|
||||
onStartRequest() {
|
||||
onStartFired = true;
|
||||
// This should force the converter to abort, too:
|
||||
|
@ -130,14 +130,14 @@ add_task(async function test_converter_principal_needs_matching() {
|
|||
// Stub all the things.
|
||||
const chan = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIChannel,
|
||||
Ci.nsIWritablePropertyBag,
|
||||
"nsIChannel",
|
||||
"nsIWritablePropertyBag",
|
||||
]),
|
||||
URI: Services.io.newURI("data:application/json,{}"),
|
||||
// loadinfo is builtinclass, need to actually have one:
|
||||
loadInfo,
|
||||
notificationCallbacks: {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIInterfaceRequestor]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIInterfaceRequestor"]),
|
||||
getInterface() {
|
||||
// We want a loadcontext here, which is also builtinclass, can't stub.
|
||||
return docShell;
|
||||
|
@ -151,7 +151,7 @@ add_task(async function test_converter_principal_needs_matching() {
|
|||
};
|
||||
let onStartFired = false;
|
||||
const listener = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIStreamListener"]),
|
||||
onStartRequest() {
|
||||
onStartFired = true;
|
||||
},
|
||||
|
|
|
@ -232,7 +232,7 @@ registerCleanupFunction(function() {
|
|||
* Watch console messages for failed propType definitions in React components.
|
||||
*/
|
||||
const ConsoleObserver = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
observe: function(subject) {
|
||||
const message = subject.wrappedJSObject.arguments[0];
|
||||
|
|
|
@ -12,7 +12,7 @@ add_task(async function() {
|
|||
// Start a listener on the console service.
|
||||
let good = true;
|
||||
const listener = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
observe: function(subject) {
|
||||
if (
|
||||
subject instanceof Ci.nsIScriptError &&
|
||||
|
|
|
@ -23,7 +23,7 @@ add_task(async function() {
|
|||
|
||||
function setupObserver() {
|
||||
const observer = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
observe: function observe(subject, topic) {
|
||||
subject = subject.QueryInterface(Ci.nsISupportsString);
|
||||
|
|
|
@ -125,8 +125,8 @@ function CustomizedReload(params) {
|
|||
|
||||
CustomizedReload.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
get window() {
|
||||
return this.docShell.DOMWindow;
|
||||
|
|
|
@ -376,8 +376,8 @@ HighlighterEnvironment.prototype = {
|
|||
const self = this;
|
||||
this.listener = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
onStateChange: function(progress, request, flag) {
|
||||
|
|
|
@ -24,7 +24,7 @@ function ChannelEventSink() {
|
|||
}
|
||||
|
||||
ChannelEventSink.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIChannelEventSink]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIChannelEventSink"]),
|
||||
|
||||
registerCollector(collector) {
|
||||
this.collectors.add(collector);
|
||||
|
|
|
@ -69,10 +69,10 @@ exports.NetworkResponseListener = NetworkResponseListener;
|
|||
|
||||
NetworkResponseListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIStreamListener,
|
||||
Ci.nsIInputStreamCallback,
|
||||
Ci.nsIRequestObserver,
|
||||
Ci.nsIInterfaceRequestor,
|
||||
"nsIStreamListener",
|
||||
"nsIInputStreamCallback",
|
||||
"nsIRequestObserver",
|
||||
"nsIInterfaceRequestor",
|
||||
]),
|
||||
|
||||
// nsIInterfaceRequestor implementation
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
* These dedicated classes are used by the LayoutChangesObserver.
|
||||
*/
|
||||
|
||||
const { Ci } = require("chrome");
|
||||
const ChromeUtils = require("ChromeUtils");
|
||||
const protocol = require("devtools/shared/protocol");
|
||||
const EventEmitter = require("devtools/shared/event-emitter");
|
||||
|
@ -460,8 +459,8 @@ class ReflowObserver extends Observable {
|
|||
}
|
||||
|
||||
ReflowObserver.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsIReflowObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIReflowObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,7 @@ class PlatformMessageWatcher {
|
|||
|
||||
// Create the consoleListener.
|
||||
const listener = {
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIConsoleListener]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIConsoleListener"]),
|
||||
observe(message) {
|
||||
if (!shouldHandleMessage(message)) {
|
||||
return;
|
||||
|
|
|
@ -1662,8 +1662,8 @@ function DebuggerProgressListener(targetActor) {
|
|||
|
||||
DebuggerProgressListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
destroy() {
|
||||
|
|
|
@ -43,8 +43,8 @@ function ContentProcessForward() {
|
|||
}
|
||||
ContentProcessForward.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
receiveMessage(message) {
|
||||
|
|
|
@ -34,8 +34,8 @@ ConsoleFileActivityListener.prototype = {
|
|||
_webProgress: null,
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIWebProgressListener",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { Ci, components } = require("chrome");
|
||||
const { components } = require("chrome");
|
||||
const ChromeUtils = require("ChromeUtils");
|
||||
|
||||
/**
|
||||
|
@ -29,8 +29,8 @@ exports.ConsoleReflowListener = ConsoleReflowListener;
|
|||
|
||||
ConsoleReflowListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIReflowObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIReflowObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
docshell: null,
|
||||
listener: null,
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { Ci } = require("chrome");
|
||||
const ChromeUtils = require("ChromeUtils");
|
||||
const Services = require("Services");
|
||||
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
@ -201,7 +200,7 @@ const ServiceWorkerRegistrationActor = protocol.ActorClassWithSpec(
|
|||
console.error("Failed to unregister the service worker for " + scope);
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIServiceWorkerUnregisterCallback,
|
||||
"nsIServiceWorkerUnregisterCallback",
|
||||
]),
|
||||
};
|
||||
swm.propagateUnregister(principal, unregisterCallback, scope);
|
||||
|
|
|
@ -48,8 +48,8 @@ function NetworkThrottleListener(queue) {
|
|||
|
||||
NetworkThrottleListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIStreamListener,
|
||||
Ci.nsIInterfaceRequestor,
|
||||
"nsIStreamListener",
|
||||
"nsIInterfaceRequestor",
|
||||
]),
|
||||
|
||||
/**
|
||||
|
|
|
@ -1251,7 +1251,7 @@ DevToolsStartup.prototype = {
|
|||
/* eslint-disable max-len */
|
||||
|
||||
classID: Components.ID("{9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLineHandler]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsICommandLineHandler"]),
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -181,8 +181,8 @@ XPCOMUtils.defineLazyGetter(this, "knownDomains", () => {
|
|||
}
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
Services.prefs.addObserver(branch, domains._observer, true);
|
||||
|
@ -239,8 +239,8 @@ XPCOMUtils.defineLazyGetter(this, "knownSuffixes", () => {
|
|||
}
|
||||
},
|
||||
QueryInterface: ChromeUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
};
|
||||
Services.prefs.addObserver(branch, suffixes._observer, true);
|
||||
|
@ -556,7 +556,7 @@ URIFixup.prototype = {
|
|||
|
||||
classID: Components.ID("{c6cf88b7-452e-47eb-bdc9-86e3561648ef}"),
|
||||
_xpcom_factory: XPCOMUtils.generateSingletonFactory(URIFixup),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIURIFixup]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIURIFixup"]),
|
||||
};
|
||||
|
||||
function URIFixupInfo(originalInput = "") {
|
||||
|
@ -621,7 +621,7 @@ URIFixupInfo.prototype = {
|
|||
},
|
||||
|
||||
classID: Components.ID("{33d75835-722f-42c0-89cc-44f328e56a86}"),
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIURIFixupInfo]),
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIURIFixupInfo"]),
|
||||
};
|
||||
|
||||
// Helpers
|
||||
|
|
|
@ -26,8 +26,8 @@ class SHistoryListener {
|
|||
OnHistoryReplaceEntry() {}
|
||||
}
|
||||
SHistoryListener.prototype.QueryInterface = ChromeUtils.generateQI([
|
||||
Ci.nsISHistoryListener,
|
||||
Ci.nsISupportsWeakReference,
|
||||
"nsISHistoryListener",
|
||||
"nsISupportsWeakReference",
|
||||
]);
|
||||
|
||||
let listeners;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче