Skip to content

Commit

Permalink
Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r…
Browse files Browse the repository at this point in the history
…=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
  • Loading branch information
kmaglione committed Jul 10, 2020
1 parent 8d808a0 commit 9d78661
Show file tree
Hide file tree
Showing 459 changed files with 1,057 additions and 1,093 deletions.
4 changes: 2 additions & 2 deletions browser/base/content/browser-data-submission-info-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ var gDataNotificationInfoBar = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),
};
6 changes: 3 additions & 3 deletions browser/base/content/browser-fullZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ var FullZoom = {
// nsISupports

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsIContentPrefObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsIContentPrefObserver",
"nsISupportsWeakReference",
]),

// Initialization & Destruction
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/browser-places.js
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ var BookmarkingUI = {
this._uninitView();
},

QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
QueryInterface: ChromeUtils.generateQI(["nsINavBookmarkObserver"]),
};

var AutoShowBookmarksToolbar = {
Expand Down
4 changes: 2 additions & 2 deletions browser/base/content/browser-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ var gSync = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),
};
8 changes: 4 additions & 4 deletions browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -5920,7 +5920,7 @@ var TabsProgressListener = {
function nsBrowserAccess() {}

nsBrowserAccess.prototype = {
QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserDOMWindow]),
QueryInterface: ChromeUtils.generateQI(["nsIBrowserDOMWindow"]),

_openURIInNewTab(
aURI,
Expand Down Expand Up @@ -8431,8 +8431,8 @@ var RestoreLastSessionObserver = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),
};

Expand Down
6 changes: 3 additions & 3 deletions browser/base/content/content-refreshblocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ var RefreshBlocker = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIWebProgressListener2,
Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference,
"nsIWebProgressListener2",
"nsIWebProgressListener",
"nsISupportsWeakReference",
]),
};

Expand Down
4 changes: 2 additions & 2 deletions browser/base/content/test/chrome/test_aboutCrashed.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
}
},

QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
"nsISupportsWeakReference"])
};

frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
}
},

QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference])
QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
"nsISupportsWeakReference"])
};

frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/general/browser_bug356571.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var fakePromptServiceFactory = {
};

var promptService = {
QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService]),
QueryInterface: ChromeUtils.generateQI(["nsIPromptService"]),
alert() {
didFail = true;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,5 +362,5 @@ WindowListener.prototype = {
domwindow.addEventListener("load", onLoad, true);
},
onCloseWindow(aXULWindow) {},
QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowMediatorListener]),
QueryInterface: ChromeUtils.generateQI(["nsIWindowMediatorListener"]),
};
2 changes: 1 addition & 1 deletion browser/base/content/test/general/browser_homeDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
4 changes: 2 additions & 2 deletions browser/base/content/test/performance/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ async function recordReflows(testPromise, win = window) {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIReflowObserver,
Ci.nsISupportsWeakReference,
"nsIReflowObserver",
"nsISupportsWeakReference",
]),
};

Expand Down
6 changes: 3 additions & 3 deletions browser/base/content/test/plugins/blocklist_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ var BlocklistProxy = {
_uuid: null,

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsIBlocklistService,
Ci.nsITimerCallback,
"nsIObserver",
"nsIBlocklistService",
"nsITimerCallback",
]),

init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions browser/base/content/test/tabs/browser_e10s_about_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ AboutModule.prototype = {
return null;
},

QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
QueryInterface: ChromeUtils.generateQI(["nsIAboutModule"]),
};

var AboutModuleFactory = {
Expand All @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions browser/components/BrowserContentHandler.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
14 changes: 7 additions & 7 deletions browser/components/BrowserGlue.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -4169,8 +4169,8 @@ BrowserGlue.prototype = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),
};

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -4873,8 +4873,8 @@ var JawsScreenReaderVersionCheck = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),

observe(subject, topic, data) {
Expand Down Expand Up @@ -5722,8 +5722,8 @@ var AboutHomeStartupCache = {
},

QueryInterface: ChromeUtils.generateQI([
Ci.nsICacheEntryOpenallback,
Ci.nsIObserver,
"nsICacheEntryOpenallback",
"nsIObserver",
]),

/** MessageListener **/
Expand Down
4 changes: 1 addition & 3 deletions browser/components/doh/TRRPerformance.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions browser/components/downloads/DownloadsCommon.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ const TELEMETRY_EVENT_CATEGORY = "downloads";

var PrefObserver = {
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),
getPref(name) {
try {
Expand Down
2 changes: 1 addition & 1 deletion browser/components/enterprisepolicies/Policies.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function WebsiteFilter(blocklist, exceptionlist) {

WebsiteFilter.prototype = {
QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),

observe(subject, topic, data) {
Expand Down
2 changes: 1 addition & 1 deletion browser/components/extensions/parent/ext-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ this.tabs = class extends ExtensionAPI {
}
},
QueryInterface: ChromeUtils.generateQI([
Ci.nsIWebProgressListener,
"nsIWebProgressListener",
]),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion browser/components/installerprefs/InstallerPrefs.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion browser/components/migration/MigrationUtils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion browser/components/migration/ProfileMigrator.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions browser/components/newtab/AboutNewTabService.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]);
}

Expand Down
4 changes: 2 additions & 2 deletions browser/components/newtab/aboutwelcome/AboutWelcomeChild.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class AboutWelcomeChild extends JSWindowActorChild {

const listener = {
QueryInterface: ChromeUtils.generateQI([
Ci.nsIWebProgressListener,
Ci.nsISupportsWeakReference,
"nsIWebProgressListener",
"nsISupportsWeakReference",
]),
};

Expand Down
2 changes: 1 addition & 1 deletion browser/components/newtab/lib/PlacesFeed.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Observer {
this.dispatch = dispatch;
this.QueryInterface = ChromeUtils.generateQI([
observerInterface,
Ci.nsISupportsWeakReference,
"nsISupportsWeakReference",
]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion browser/components/payments/PaymentUIService.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions browser/components/payments/content/paymentDialogWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ var paymentDialogWrapper = {
temporaryStore: null,

QueryInterface: ChromeUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
"nsIObserver",
"nsISupportsWeakReference",
]),

/**
Expand Down
Loading

0 comments on commit 9d78661

Please sign in to comment.