Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r?mccr8 draft
authorKris Maglione <maglione.k@gmail.com>
Sun, 22 Apr 2018 20:55:06 -0700
changeset 786765 69ca4d64c851c6629e89fd31aa49b6e015388dba
parent 786393 74d0d8ee44442efb7f5f9f3b01b42d845d28f97f
child 786766 d8ad6581e5206c9d9d7d461ed07e3b33de08a1d2
push id107565
push usermaglione.k@gmail.com
push dateMon, 23 Apr 2018 20:00:34 +0000
reviewersmccr8
bugs1456035
milestone61.0a1
Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r?mccr8 This also removes any redundant Ci.nsISupports elements in the interface lists. This was done using the following script: https://bitbucket.org/kmaglione/m-c-rewrites/src/acecb401b76cfcc6ff7f0ba3ae69929955716152/processors/chromeutils-generateQI.jsm MozReview-Commit-ID: AIx10P8GpZY
accessible/jsat/ContentControl.jsm
accessible/jsat/EventManager.jsm
accessible/jsat/Traversal.jsm
accessible/jsat/Utils.jsm
accessible/tests/mochitest/pivot.js
browser/base/content/browser-data-submission-info-bar.js
browser/base/content/browser-feeds.js
browser/base/content/browser-fullZoom.js
browser/base/content/browser-places.js
browser/base/content/browser-sync.js
browser/base/content/browser.js
browser/base/content/content.js
browser/base/content/tab-content.js
browser/base/content/test/about/head.js
browser/base/content/test/chrome/test_aboutCrashed.xul
browser/base/content/test/general/browser_bug356571.js
browser/base/content/test/general/browser_e10s_about_process.js
browser/base/content/test/general/browser_fullscreen-window-open.js
browser/base/content/test/general/browser_homeDrop.js
browser/base/content/test/general/head.js
browser/base/content/test/performance/head.js
browser/base/content/test/plugins/blocklist_proxy.js
browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
browser/base/content/test/urlbar/browser_urlbar_search_no_speculative_connect_with_client_cert.js
browser/base/content/test/urlbar/head.js
browser/components/about/nsAboutCapabilities.js
browser/components/downloads/DownloadsCommon.jsm
browser/components/enterprisepolicies/EnterprisePolicies.js
browser/components/enterprisepolicies/EnterprisePoliciesContent.js
browser/components/enterprisepolicies/helpers/WebsiteFilter.jsm
browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
browser/components/extensions/parent/ext-tabs.js
browser/components/feeds/FeedWriter.js
browser/components/feeds/WebContentConverter.js
browser/components/migration/AutoMigrate.jsm
browser/components/migration/MigrationUtils.jsm
browser/components/migration/ProfileMigrator.js
browser/components/newtab/aboutNewTabService.js
browser/components/nsBrowserContentHandler.js
browser/components/nsBrowserGlue.js
browser/components/places/content/browserPlacesViews.js
browser/components/places/content/controller.js
browser/components/places/content/editBookmark.js
browser/components/places/tests/browser/browser_editBookmark_keywords.js
browser/components/places/tests/browser/browser_views_liveupdate.js
browser/components/places/tests/unit/head_bookmarks.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/tests/browser_advanced_update.js
browser/components/preferences/translation.js
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
browser/components/search/test/head.js
browser/components/sessionstore/ContentRestore.jsm
browser/components/sessionstore/SessionStore.jsm
browser/components/sessionstore/content/content-sessionStore.js
browser/components/sessionstore/nsSessionStartup.js
browser/components/sessionstore/test/browser_599909.js
browser/components/sessionstore/test/browser_async_remove_tab.js
browser/components/sessionstore/test/browser_not_collect_when_idle.js
browser/components/sessionstore/test/browser_parentProcessRestoreHash.js
browser/components/sessionstore/test/content.js
browser/components/shell/HeadlessShell.jsm
browser/components/tests/browser/browser_contentpermissionprompt.js
browser/components/tests/startupRecorder.js
browser/components/translation/TranslationContentHandler.jsm
browser/components/uitour/test/browser_UITour_defaultBrowser.js
browser/extensions/activity-stream/lib/PlacesFeed.jsm
browser/extensions/followonsearch/content/followonsearch-fs.js
browser/extensions/formautofill/FormAutofillContent.jsm
browser/extensions/formautofill/FormAutofillParent.jsm
browser/extensions/formautofill/MasterPassword.jsm
browser/extensions/formautofill/ProfileAutoCompleteResult.jsm
browser/extensions/formautofill/test/unit/test_masterPassword.js
browser/extensions/pdfjs/content/PdfJs.jsm
browser/extensions/pdfjs/content/PdfStreamConverter.jsm
browser/extensions/pocket/content/AboutPocket.jsm
browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm
browser/modules/BrowserUsageTelemetry.jsm
browser/modules/FormSubmitObserver.jsm
browser/modules/Sanitizer.jsm
browser/modules/SiteDataManager.jsm
browser/modules/WindowsPreviewPerTab.jsm
browser/modules/test/browser/browser_UsageTelemetry_domains.js
browser/modules/test/browser/contentSearch.js
browser/modules/test/browser/formValidation/browser_form_validation.js
browser/modules/test/browser/head.js
caps/tests/mochitest/test_extensionURL.html
chrome/test/unit/test_no_remote_registration.js
devtools/client/webconsole/test/mochitest/browser_webconsole_network_requests_from_chrome.js
devtools/client/webconsole/test/mochitest/browser_webconsole_observer_notifications.js
devtools/startup/aboutdebugging-registration.js
devtools/startup/aboutdevtools/aboutdevtools-registration.js
devtools/startup/aboutdevtoolstoolbox-registration.js
docshell/test/browser/browser_bug655270.js
docshell/test/browser/browser_bug670318.js
docshell/test/browser/browser_onbeforeunload_navigation.js
docshell/test/browser/file_bug1328501_framescript.js
docshell/test/browser/file_bug422543_script.js
docshell/test/chrome/test_bug909218.html
docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul
dom/base/DOMRequestHelper.jsm
dom/base/ProcessSelector.js
dom/base/SlowScriptDebug.js
dom/base/contentAreaDropListener.js
dom/base/test/browser_bug1303838.js
dom/base/test/browser_promiseDocumentFlushed.js
dom/base/test/chrome/file_bug549682.xul
dom/base/test/chrome/test_bug682305.html
dom/base/test/chrome/test_bug800386.xul
dom/bindings/test/TestInterfaceJS.js
dom/bindings/test/TestInterfaceJSMaplike.js
dom/browser-element/BrowserElementChildPreload.js
dom/browser-element/BrowserElementParent.js
dom/browser-element/BrowserElementPromptService.jsm
dom/console/ConsoleAPIStorage.js
dom/html/htmlMenuBuilder.js
dom/html/test/head.js
dom/indexedDB/test/unit/GlobalObjectsComponent.js
dom/media/IdpSandbox.jsm
dom/media/PeerConnection.js
dom/media/webvtt/WebVTTParserWrapper.js
dom/notification/NotificationStorage.js
dom/payments/test/BasiccardChromeScript.js
dom/payments/test/CurrencyAmountValidationChromeScript.js
dom/payments/test/PMIValidationChromeScript.js
dom/payments/test/RequestShippingChromeScript.js
dom/payments/test/ShippingOptionsChromeScript.js
dom/payments/test/ShowPaymentChromeScript.js
dom/presentation/PresentationDataChannelSessionTransport.js
dom/presentation/PresentationNetworkHelper.js
dom/presentation/provider/AndroidCastDeviceProvider.js
dom/presentation/provider/PresentationControlService.js
dom/presentation/tests/mochitest/PresentationDeviceInfoChromeScript.js
dom/presentation/tests/mochitest/PresentationSessionChromeScript.js
dom/presentation/tests/mochitest/PresentationSessionChromeScript1UA.js
dom/presentation/tests/mochitest/test_presentation_datachannel_sessiontransport.html
dom/presentation/tests/xpcshell/test_multicast_dns_device_provider.js
dom/presentation/tests/xpcshell/test_presentation_device_manager.js
dom/presentation/tests/xpcshell/test_presentation_session_transport.js
dom/presentation/tests/xpcshell/test_tcp_control_channel.js
dom/push/Push.js
dom/push/PushComponents.js
dom/push/test/mockpushserviceparent.js
dom/push/test/xpcshell/PushServiceHandler.js
dom/push/test/xpcshell/head.js
dom/push/test/xpcshell/test_permissions.js
dom/system/NetworkGeolocationProvider.js
dom/tests/browser/browser_ConsoleAPI_originAttributes.js
dom/tests/browser/browser_ConsoleStorageAPITests.js
dom/tests/browser/browser_bug1004814.js
dom/tests/mochitest/bugs/test_bug61098.html
dom/websocket/tests/test_websocket_frame.html
dom/workers/test/extensions/bootstrap/bootstrap.js
dom/workers/test/test_extensionBootstrap.xul
dom/xslt/xslt/txEXSLTRegExFunctions.js
editor/composer/test/test_bug1266815.html
editor/libeditor/EditorUtils.js
extensions/cookie/test/unit/test_permmanager_migrate_4-7_no_history.js
intl/l10n/Localization.jsm
js/xpconnect/loader/XPCOMUtils.jsm
js/xpconnect/tests/chrome/test_bug799348.xul
js/xpconnect/tests/chrome/test_nsScriptErrorWithStack.html
js/xpconnect/tests/components/js/xpctest_attributes.js
js/xpconnect/tests/components/js/xpctest_bug809674.js
js/xpconnect/tests/components/js/xpctest_interfaces.js
js/xpconnect/tests/components/js/xpctest_params.js
js/xpconnect/tests/components/js/xpctest_returncode_child.js
js/xpconnect/tests/components/js/xpctest_utils.js
js/xpconnect/tests/unit/component-blob.js
js/xpconnect/tests/unit/component-file.js
js/xpconnect/tests/unit/component_import.js
js/xpconnect/tests/unit/test_xpcomutils.js
layout/tools/recording/recording-cmdline.js
mobile/android/chrome/content/aboutAccounts.js
mobile/android/chrome/content/browser.js
mobile/android/components/AboutRedirector.js
mobile/android/components/AddonUpdateService.js
mobile/android/components/BlocklistPrompt.js
mobile/android/components/BrowserCLH.js
mobile/android/components/ColorPicker.js
mobile/android/components/ContentDispatchChooser.js
mobile/android/components/ContentPermissionPrompt.js
mobile/android/components/DirectoryProvider.js
mobile/android/components/FilePicker.js
mobile/android/components/FxAccountsPush.js
mobile/android/components/HelperAppDialog.js
mobile/android/components/ImageBlockingPolicy.js
mobile/android/components/LoginManagerPrompter.js
mobile/android/components/NSSDialogService.js
mobile/android/components/PersistentNotificationHandler.js
mobile/android/components/PresentationDevicePrompt.js
mobile/android/components/PresentationRequestUIGlue.js
mobile/android/components/PromptService.js
mobile/android/components/SessionStore.js
mobile/android/components/Snippets.js
mobile/android/components/TabSource.js
mobile/android/components/XPIDialogService.js
mobile/android/components/geckoview/GeckoViewExternalAppService.js
mobile/android/components/geckoview/GeckoViewPermission.js
mobile/android/components/geckoview/GeckoViewPrompt.js
mobile/android/components/geckoview/GeckoViewStartup.js
mobile/android/modules/NetErrorHelper.jsm
mobile/android/tests/browser/robocop/testAndroidCastDeviceProvider.js
netwerk/dns/mdns/libmdns/nsDNSServiceDiscovery.js
netwerk/protocol/http/UAOverridesBootstrapper.js
netwerk/protocol/http/UserAgentUpdates.jsm
netwerk/protocol/http/WellKnownOpportunisticUtils.js
netwerk/test/browser/browser_NetUtil.js
netwerk/test/browser/browser_nsIFormPOSTActionChannel.js
netwerk/test/unit/client_cert_chooser.js
netwerk/test/unit/test_1351443-missing-NewChannel2.js
netwerk/test/unit/test_about_protocol.js
netwerk/test/unit/test_bug1218029.js
netwerk/test/unit/test_bug365133.js
netwerk/test/unit/test_bug484684.js
netwerk/test/unit/test_bug515583.js
netwerk/test/unit/test_bug543805.js
netwerk/test/unit/test_bug894586.js
netwerk/test/unit/test_synthesized_response.js
netwerk/test/unit/test_udpsocket.js
security/manager/ssl/tests/mochitest/browser/browser_clientAuth_connection.js
security/manager/ssl/tests/mochitest/browser/browser_downloadCert_ui.js
security/manager/ssl/tests/mochitest/browser/browser_loadPKCS11Module_ui.js
security/manager/ssl/tests/unit/test_certDB_import.js
security/manager/ssl/tests/unit/test_certDB_import_pkcs12.js
security/manager/ssl/tests/unit/test_certDB_import_with_master_password.js
security/manager/ssl/tests/unit/test_js_cert_override_service.js
security/manager/ssl/tests/unit/test_password_prompt.js
security/manager/ssl/tests/unit/test_pkcs11_safe_mode.js
security/manager/ssl/tests/unit/test_sdr.js
security/manager/ssl/tests/unit/test_sdr_preexisting_with_password.js
security/manager/tools/getHSTSPreloadList.js
services/common/async.js
services/common/observers.js
services/common/rest.js
services/common/tests/unit/head_helpers.js
services/crypto/modules/WeaveCrypto.js
services/fxaccounts/FxAccountsProfile.jsm
services/fxaccounts/FxAccountsPush.js
services/fxaccounts/tests/browser/head.js
services/fxaccounts/tests/xpcshell/test_accounts.js
services/sync/Weave.js
services/sync/modules/engines/bookmarks.js
services/sync/modules/engines/forms.js
services/sync/modules/engines/history.js
services/sync/modules/engines/tabs.js
services/sync/modules/service.js
services/sync/tests/unit/test_history_store.js
services/sync/tps/extensions/tps/bootstrap.js
services/sync/tps/extensions/tps/resource/tps.jsm
storage/test/unit/test_vacuum.js
storage/test/unit/vacuumParticipant.js
taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js
testing/marionette/cert.js
testing/marionette/components/marionette.js
testing/marionette/driver.js
testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm
testing/mochitest/BrowserTestUtils/content/content-about-page-utils.js
testing/modules/MockRegistrar.jsm
testing/modules/MockRegistry.jsm
testing/modules/tests/xpcshell/test_mockRegistrar.js
testing/specialpowers/content/MockColorPicker.jsm
testing/specialpowers/content/MockFilePicker.jsm
testing/specialpowers/content/MockPermissionPrompt.jsm
testing/specialpowers/content/SpecialPowersObserver.jsm
testing/specialpowers/content/specialpowersAPI.js
testing/talos/talos/pageloader/bootstrap.js
testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js
testing/talos/talos/talos-powers/bootstrap.js
testing/talos/talos/tests/tabswitch/api.js
testing/talos/talos/tests/tabswitch/content/tabswitch-content-process.js
toolkit/components/asyncshutdown/nsAsyncShutdown.js
toolkit/components/autocomplete/tests/unit/head_autocomplete.js
toolkit/components/autocomplete/tests/unit/test_immediate_search.js
toolkit/components/autocomplete/tests/unit/test_stopSearch.js
toolkit/components/backgroundhangmonitor/BHRTelemetryService.js
toolkit/components/captivedetect/captivedetect.js
toolkit/components/captivedetect/test/unit/test_abort.js
toolkit/components/captivedetect/test/unit/test_abort_during_user_login.js
toolkit/components/captivedetect/test/unit/test_abort_ongoing_request.js
toolkit/components/captivedetect/test/unit/test_abort_pending_request.js
toolkit/components/captivedetect/test/unit/test_captive_portal_found.js
toolkit/components/captivedetect/test/unit/test_captive_portal_found_303.js
toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js
toolkit/components/captivedetect/test/unit/test_captive_portal_not_found_404.js
toolkit/components/captivedetect/test/unit/test_multiple_requests.js
toolkit/components/captivedetect/test/unit/test_user_cancel.js
toolkit/components/contentprefs/ContentPrefService2.js
toolkit/components/contentprefs/ContentPrefServiceChild.jsm
toolkit/components/contentprefs/ContentPrefUtils.jsm
toolkit/components/contextualidentity/ContextualIdentityService.jsm
toolkit/components/crashes/CrashService.js
toolkit/components/crashmonitor/nsCrashMonitor.js
toolkit/components/downloads/DownloadCore.jsm
toolkit/components/downloads/DownloadIntegration.jsm
toolkit/components/downloads/DownloadLegacy.js
toolkit/components/downloads/test/unit/head.js
toolkit/components/extensions/ExtensionXPCShellUtils.jsm
toolkit/components/extensions/extension-process-script.js
toolkit/components/extensions/parent/ext-identity.js
toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
toolkit/components/extensions/test/xpcshell/test_ext_idle.js
toolkit/components/extensions/test/xpcshell/test_ext_management_uninstall_self.js
toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
toolkit/components/extensions/test/xpcshell/test_locale_converter.js
toolkit/components/feeds/FeedProcessor.js
toolkit/components/gfx/SanityTest.js
toolkit/components/gfx/content/gfxFrameScript.js
toolkit/components/mozintl/mozIntl.js
toolkit/components/mozprotocol/mozProtocolHandler.js
toolkit/components/normandy/content/AboutPages.jsm
toolkit/components/nsDefaultCLH.js
toolkit/components/passwordmgr/LoginManagerContent.jsm
toolkit/components/passwordmgr/LoginManagerParent.jsm
toolkit/components/passwordmgr/crypto-SDR.js
toolkit/components/passwordmgr/nsLoginInfo.js
toolkit/components/passwordmgr/nsLoginManager.js
toolkit/components/passwordmgr/nsLoginManagerPrompter.js
toolkit/components/passwordmgr/storage-json.js
toolkit/components/passwordmgr/storage-mozStorage.js
toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js
toolkit/components/passwordmgr/test/mochitest/test_bug_627616.html
toolkit/components/passwordmgr/test/unit/test_notifications.js
toolkit/components/payments/content/paymentDialogWrapper.js
toolkit/components/payments/paymentUIService.js
toolkit/components/places/ColorAnalyzer.js
toolkit/components/places/PageIconProtocolHandler.js
toolkit/components/places/PlacesCategoriesStarter.js
toolkit/components/places/PlacesSearchAutocompleteProvider.jsm
toolkit/components/places/PlacesUtils.jsm
toolkit/components/places/UnifiedComplete.js
toolkit/components/places/nsLivemarkService.js
toolkit/components/places/nsPlacesExpiration.js
toolkit/components/places/nsTaggingService.js
toolkit/components/places/tests/PlacesTestUtils.jsm
toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
toolkit/components/places/tests/browser/browser_bug399606.js
toolkit/components/places/tests/browser/browser_bug646422.js
toolkit/components/places/tests/browser/browser_notfound.js
toolkit/components/places/tests/browser/browser_settitle.js
toolkit/components/places/tests/browser/head.js
toolkit/components/places/tests/chrome/test_371798.xul
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/legacy/test_bookmarks.js
toolkit/components/places/tests/sync/head_sync.js
toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
toolkit/components/places/tests/unifiedcomplete/test_history_autocomplete_tags.js
toolkit/components/places/tests/unit/test_adaptive.js
toolkit/components/places/tests/unit/test_adaptive_bug527311.js
toolkit/components/places/tests/unit/test_bug636917_isLivemark.js
toolkit/components/places/tests/unit/test_history_observer.js
toolkit/components/places/tests/unit/test_onItemChanged_tags.js
toolkit/components/privatebrowsing/PrivateBrowsingTrackingProtectionWhitelist.js
toolkit/components/processsingleton/ContentProcessSingleton.js
toolkit/components/processsingleton/MainProcessSingleton.js
toolkit/components/prompts/src/nsPrompter.js
toolkit/components/remotebrowserutils/RemoteWebNavigation.js
toolkit/components/reputationservice/test/unit/test_app_rep.js
toolkit/components/satchel/AutoCompletePopup.jsm
toolkit/components/satchel/FormHistoryStartup.js
toolkit/components/satchel/formSubmitListener.js
toolkit/components/satchel/nsFormAutoComplete.js
toolkit/components/satchel/nsFormAutoCompleteResult.jsm
toolkit/components/satchel/nsInputListAutoComplete.js
toolkit/components/satchel/test/unit/test_notify.js
toolkit/components/search/nsSearchService.js
toolkit/components/search/nsSearchSuggestions.js
toolkit/components/search/nsSidebar.js
toolkit/components/search/tests/xpcshell/head_search.js
toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
toolkit/components/search/tests/xpcshell/test_location_malformed_json.js
toolkit/components/search/tests/xpcshell/test_location_sync.js
toolkit/components/securityreporter/SecurityReporter.js
toolkit/components/telemetry/TelemetryController.jsm
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/TelemetrySend.jsm
toolkit/components/telemetry/TelemetryStartup.js
toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
toolkit/components/terminator/nsTerminatorTelemetry.js
toolkit/components/thumbnails/BackgroundPageThumbs.jsm
toolkit/components/thumbnails/PageThumbs.jsm
toolkit/components/thumbnails/PageThumbsStorageService.js
toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
toolkit/components/timermanager/nsUpdateTimerManager.js
toolkit/components/timermanager/tests/unit/consumerNotifications.js
toolkit/components/tooltiptext/TooltipTextProvider.js
toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js
toolkit/components/url-classifier/nsUrlClassifierLib.js
toolkit/components/url-classifier/tests/mochitest/test_threathit_report.html
toolkit/components/urlformatter/nsURLFormatter.js
toolkit/components/utils/simpleServices.js
toolkit/components/xulstore/XULStore.js
toolkit/content/aboutServiceWorkers.js
toolkit/content/browser-content.js
toolkit/content/preferencesBindings.js
toolkit/content/tests/browser/browser_isSynthetic.js
toolkit/content/tests/browser/common/mockTransfer.js
toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul
toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xul
toolkit/content/tests/widgets/test_popupreflows.xul
toolkit/forgetaboutsite/ServiceWorkerCleanUp.jsm
toolkit/modules/Finder.jsm
toolkit/modules/HiddenFrame.jsm
toolkit/modules/NewTabUtils.jsm
toolkit/modules/Preferences.jsm
toolkit/modules/RemoteController.js
toolkit/modules/RemoteSecurityUI.jsm
toolkit/modules/RemoteWebProgress.jsm
toolkit/modules/Timer.jsm
toolkit/modules/addons/WebNavigation.jsm
toolkit/modules/addons/WebNavigationContent.js
toolkit/modules/addons/WebRequest.jsm
toolkit/modules/addons/WebRequestContent.js
toolkit/modules/tests/modules/MockDocument.jsm
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/addonManager.js
toolkit/mozapps/extensions/amContentHandler.js
toolkit/mozapps/extensions/amInstallTrigger.js
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
toolkit/mozapps/extensions/internal/GMPProvider.jsm
toolkit/mozapps/extensions/nsBlocklistService.js
toolkit/mozapps/extensions/test/addons/test_cache_certdb/bootstrap.js
toolkit/mozapps/extensions/test/browser/browser_bug562797.js
toolkit/mozapps/extensions/test/browser/browser_discovery.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_appversion.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_outdated.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_severities.js
toolkit/mozapps/extensions/test/xpcshell/test_moved_extension_metadata.js
toolkit/mozapps/extensions/test/xpcshell/test_pluginchange.js
toolkit/mozapps/extensions/test/xpinstall/head.js
toolkit/mozapps/handling/nsContentDispatchChooser.js
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/nsUpdateServiceStub.js
toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul
toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul
toolkit/mozapps/update/tests/data/shared.js
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
toolkit/mozapps/update/tests/unit_aus_update/downloadCompleteAfterPartialFailure.js
toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
toolkit/xre/test/test_launch_without_hang.js
uriloader/exthandler/HandlerService.js
uriloader/exthandler/nsWebHandlerApp.js
uriloader/exthandler/tests/mochitest/browser_auto_close_window.js
uriloader/exthandler/tests/mochitest/browser_download_privatebrowsing.js
uriloader/exthandler/tests/mochitest/head.js
uriloader/exthandler/tests/mochitest/unsafeBidi_chromeScript.js
uriloader/exthandler/tests/unit/test_getTypeFromExtension_with_empty_Content_Type.js
widget/headless/tests/test_headless.js
xpcom/ds/nsINIProcessor.js
xpcom/tests/unit/data/child_process_directive_service.js
xpcom/tests/unit/data/main_process_directive_service.js
xpcom/tests/unit/test_bug1434856.js
xpcom/tests/unit/test_bug656331.js
xpcom/tests/unit/test_notxpcom_scriptable.js
--- a/accessible/jsat/ContentControl.jsm
+++ b/accessible/jsat/ContentControl.jsm
@@ -499,12 +499,12 @@ this.ContentControl.prototype = {
     }
   },
 
   cancelAutoMove: function cc_cancelAutoMove() {
     this.window.clearTimeout(this._autoMove);
     this._autoMove = 0;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
+  QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference,
     Ci.nsIMessageListener
   ])
 };
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -557,20 +557,17 @@ this.EventManager.prototype = {
     }
   },
 
   onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
     let docAcc = Utils.AccService.getAccessibleFor(aWebProgress.DOMWindow.document);
     this.present(Presentation.tabStateChanged(docAcc, "newdoc"));
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsISupports,
-                                         Ci.nsIObserver])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference, Ci.nsIObserver])
 };
 
 const AccessibilityEventObserver = {
 
   /**
    * A WeakMap containing [content, EventManager] pairs.
    */
   eventManagers: new WeakMap(),
--- a/accessible/jsat/Traversal.jsm
+++ b/accessible/jsat/Traversal.jsm
@@ -62,17 +62,17 @@ BaseTraversalRule.prototype = {
         if (control && this._explicitMatchRoles.has(control.role)) {
           matchResult = this._matchFunc(control) | Filters.IGNORE_SUBTREE;
         }
       }
 
       return matchResult;
     },
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIAccessibleTraversalRule])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIAccessibleTraversalRule])
 };
 
 var gSimpleTraversalRoles =
   [Roles.MENUITEM,
    Roles.LINK,
    Roles.PAGETAB,
    Roles.GRAPHIC,
    Roles.STATICTEXT,
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -1052,11 +1052,11 @@ PrefCache.prototype = {
       try {
         this.callback(this.name, this.value, false);
       } catch (x) {
         Logger.logException(x);
       }
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                          Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                           Ci.nsISupportsWeakReference])
 };
--- a/accessible/tests/mochitest/pivot.js
+++ b/accessible/tests/mochitest/pivot.js
@@ -29,17 +29,17 @@ var HeadersTraversalRule =
   },
 
   preFilter: PREFILTER_INVISIBLE,
 
   match(aAccessible) {
     return FILTER_MATCH;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([nsIAccessibleTraversalRule])
+  QueryInterface: ChromeUtils.generateQI([nsIAccessibleTraversalRule])
 };
 
 /**
  * Traversal rule for all focusable nodes or leafs.
  */
 var ObjectTraversalRule =
 {
   getMatchRoles(aRules) {
@@ -57,17 +57,17 @@ var ObjectTraversalRule =
       rv = FILTER_IGNORE_SUBTREE | FILTER_MATCH;
     else if (aAccessible.childCount == 0 &&
              role != ROLE_STATICTEXT && aAccessible.name.trim())
       rv = FILTER_MATCH;
 
     return rv;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([nsIAccessibleTraversalRule])
+  QueryInterface: ChromeUtils.generateQI([nsIAccessibleTraversalRule])
 };
 
 // //////////////////////////////////////////////////////////////////////////////
 // Virtual state invokers and checkers
 
 /**
  * A checker for virtual cursor changed events.
  */
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -113,13 +113,13 @@ var gDataNotificationInfoBar = {
         this._actionTaken = true;
         this._clearPolicyNotification();
         break;
 
       default:
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
   ]),
 };
--- a/browser/base/content/browser-feeds.js
+++ b/browser/base/content/browser-feeds.js
@@ -407,18 +407,18 @@ var FeedHandler = {
                 .createInstance(Ci.nsIProcess);
       p.init(clientApp);
       p.run(false, [aSpec], 1);
     }
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
 
   init() {
     window.messageManager.addMessageListener("FeedWriter:ChooseClientApp", this);
     window.messageManager.addMessageListener("FeedWriter:GetSubscriptionUI", this);
     window.messageManager.addMessageListener("FeedWriter:SetFeedPrefsAndSubscribe", this);
     window.messageManager.addMessageListener("FeedWriter:ShownFirstRun", this);
 
--- a/browser/base/content/browser-fullZoom.js
+++ b/browser/base/content/browser-fullZoom.js
@@ -34,20 +34,17 @@ var FullZoom = {
         !Services.prefs.getBoolPref("privacy.resistFingerprinting") &&
         Services.prefs.getBoolPref("browser.zoom.siteSpecific");
     }
     return this._siteSpecificPref;
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsIContentPrefObserver,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsISupports]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsIContentPrefObserver, Ci.nsISupportsWeakReference]),
 
   // Initialization & Destruction
 
   init: function FullZoom_init() {
     gBrowser.addEventListener("ZoomChangeUsingMouseWheel", this);
 
     // Register ourselves with the service so we know when our pref changes.
     this._cps2 = Cc["@mozilla.org/content-pref/service;1"].
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1744,17 +1744,17 @@ var BookmarkingUI = {
     if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window)
       return;
 
     // The view gets broken by being removed and reinserted. Uninit
     // here so popupshowing will generate a new one:
     this._uninitView();
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsINavBookmarkObserver
   ])
 };
 
 var AutoShowBookmarksToolbar = {
   init() {
     Services.obs.addObserver(this, "autoshow-bookmarks-toolbar");
   },
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -656,13 +656,13 @@ var gSync = {
 
   onSyncDisabled() {
     const toHide = [...document.querySelectorAll(".sync-ui-item")];
     for (const item of toHide) {
       item.hidden = true;
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference
   ])
 };
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -5273,17 +5273,17 @@ var TabsProgressListener = {
 
     FullZoom.onLocationChange(aLocationURI, false, aBrowser);
   },
 };
 
 function nsBrowserAccess() { }
 
 nsBrowserAccess.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow, Ci.nsISupports]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserDOMWindow]),
 
   _openURIInNewTab(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
                    aIsExternal, aForceNotRemote = false,
                    aUserContextId = Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID,
                    aOpenerWindow = null, aOpenerBrowser = null,
                    aTriggeringPrincipal = null, aNextTabParentId = 0, aName = "") {
     let win, needToFocusWin;
 
@@ -7629,18 +7629,18 @@ var RestoreLastSessionObserver = {
 
   observe() {
     // The last session can only be restored once so there's
     // no way we need to re-enable our menu item.
     Services.obs.removeObserver(this, "sessionstore-last-session-cleared");
     goSetCommandEnabled("Browser:RestoreLastSession", false);
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference])
 };
 
 function restoreLastSession() {
   SessionStore.restoreLastSession();
 }
 
 /* Observes menus and adjusts their size for better
  * usability when opened via a touch screen. */
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -1519,14 +1519,14 @@ let OfflineApps = {
     if (aTopic == "offline-cache-update-completed") {
       let cacheUpdate = aSubject.QueryInterface(Ci.nsIOfflineCacheUpdate);
       let uri = cacheUpdate.manifestURI;
       if (uri && this._docManifestSet.has(uri.spec)) {
         sendAsyncMessage("OfflineApps:CheckUsage", {uri: uri.spec});
       }
     }
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 };
 
 addEventListener("MozApplicationManifest", OfflineApps, false);
 addMessageListener("OfflineApps:StartFetching", OfflineApps);
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -854,20 +854,17 @@ var RefreshBlocker = {
                           .QueryInterface(Ci.nsIRefreshURI);
 
       let URI = Services.io.newURI(data.URI);
 
       refreshURI.forceRefreshURI(URI, null, data.delay, true);
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener2,
-                                         Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsISupports]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener2, Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
 };
 
 RefreshBlocker.init();
 
 var UserContextIdNotifier = {
   init() {
     addEventListener("DOMWindowCreated", this);
   },
--- a/browser/base/content/test/about/head.js
+++ b/browser/base/content/test/about/head.js
@@ -114,17 +114,17 @@ function waitForDocLoadAndStopIt(aExpect
           wp.removeProgressListener(progressListener);
 
           let chan = req.QueryInterface(Ci.nsIChannel);
           dump(`waitForDocLoadAndStopIt: Document start: ${chan.URI.spec}\n`);
 
           stopContent(contentStopFromProgressListener, chan.originalURI.spec);
         }
       },
-      QueryInterface: XPCOMUtils.generateQI(["nsISupportsWeakReference"])
+      QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference"])
     };
     wp.addProgressListener(progressListener, wp.NOTIFY_STATE_WINDOW);
 
     /**
      * As |this| is undefined and we can't extend |docShell|, adding an unload
      * event handler is the easiest way to ensure the weakly referenced
      * progress listener is kept alive as long as necessary.
      */
--- a/browser/base/content/test/chrome/test_aboutCrashed.xul
+++ b/browser/base/content/test/chrome/test_aboutCrashed.xul
@@ -27,18 +27,18 @@
                             .getInterface(Ci.nsIWebProgress)
                             .removeProgressListener(progressListener,
                                                     Ci.nsIWebProgress.NOTIFY_LOCATION);
 
               resolve();
             }
           },
 
-          QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                                 Ci.nsISupportsWeakReference])
+          QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                                  Ci.nsISupportsWeakReference])
         };
 
         frame.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIWebProgress)
                       .addProgressListener(progressListener,
                                            Ci.nsIWebProgress.NOTIFY_LOCATION);
       });
     }
--- a/browser/base/content/test/general/browser_bug356571.js
+++ b/browser/base/content/test/general/browser_bug356571.js
@@ -17,17 +17,17 @@ var fakePromptServiceFactory = {
   createInstance(aOuter, aIid) {
     if (aOuter != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return promptService.QueryInterface(aIid);
   }
 };
 
 var promptService = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService]),
   alert() {
     didFail = true;
   }
 };
 
 /* FIXME
 Cm.QueryInterface(Ci.nsIComponentRegistrar)
   .registerFactory(Components.ID(kPromptServiceUUID), "Prompt Service",
--- a/browser/base/content/test/general/browser_e10s_about_process.js
+++ b/browser/base/content/test/general/browser_e10s_about_process.js
@@ -41,31 +41,31 @@ AboutModule.prototype = {
     ok(false, "Called getURIFlags for an unknown page " + aURI.spec);
     return 0;
   },
 
   getIndexedDBOriginPostfix(aURI) {
     return null;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule])
 };
 
 var AboutModuleFactory = {
   createInstance(aOuter, aIID) {
     if (aOuter)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return new AboutModule().QueryInterface(aIID);
   },
 
   lockFactory(aLock) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
 };
 
 add_task(async function init() {
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
   for (let module of TEST_MODULES) {
     registrar.registerFactory(Components.ID(module.id), "",
                               "@mozilla.org/network/protocol/about;1?what=" + module.path,
                               AboutModuleFactory);
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -337,11 +337,10 @@ WindowListener.prototype = {
       } else {
         domwindow.close();
         executeSoon(this.callBack_onFinalize);
       }
     };
     domwindow.addEventListener("load", onLoad, true);
   },
   onCloseWindow(aXULWindow) {},
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener,
-                                         Ci.nsISupports]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowMediatorListener]),
 };
--- a/browser/base/content/test/general/browser_homeDrop.js
+++ b/browser/base/content/test/general/browser_homeDrop.js
@@ -24,17 +24,17 @@ add_task(async function() {
     EventUtils.synthesizeDrop(dragSrcElement, homeButton, dragData, "copy", window);
 
     let setHomepageDialog = await setHomepageDialogPromise;
     ok(true, "dialog appeared in response to home button drop");
     await BrowserTestUtils.waitForEvent(setHomepageDialog, "load", false);
 
     let setHomepagePromise = new Promise(function(resolve) {
       let observer = {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
         observe(subject, topic, data) {
           is(topic, "nsPref:changed", "observed correct topic");
           is(data, HOMEPAGE_PREF, "observed correct data");
           let modified = Services.prefs.getStringPref(HOMEPAGE_PREF);
           is(modified, homepage, "homepage is set correctly");
           Services.prefs.removeObserver(HOMEPAGE_PREF, observer);
 
           Services.prefs.setStringPref(HOMEPAGE_PREF, "about:mozilla;");
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -560,17 +560,17 @@ function promiseOnBookmarkItemAdded(aExp
         }
       },
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
       onItemRemoved() {},
       onItemChanged() {},
       onItemVisited() {},
       onItemMoved() {},
-      QueryInterface: XPCOMUtils.generateQI([
+      QueryInterface: ChromeUtils.generateQI([
         Ci.nsINavBookmarkObserver,
       ])
     };
     info("Waiting for a bookmark to be added");
     PlacesUtils.bookmarks.addObserver(bookmarksObserver);
   });
 }
 
--- a/browser/base/content/test/performance/head.js
+++ b/browser/base/content/test/performance/head.js
@@ -49,18 +49,18 @@ async function recordReflows(testPromise
       dirtyFrame(win);
     },
 
     reflowInterruptible(start, end) {
       // Interruptible reflows are the reflows caused by the refresh
       // driver ticking. These are fine.
     },
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
-                                           Ci.nsISupportsWeakReference])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIReflowObserver,
+                                            Ci.nsISupportsWeakReference])
   };
 
   let docShell = win.QueryInterface(Ci.nsIInterfaceRequestor)
                     .getInterface(Ci.nsIWebNavigation)
                     .QueryInterface(Ci.nsIDocShell);
   docShell.addWeakReflowObserver(observer);
 
   let dirtyFrameFn = event => {
--- a/browser/base/content/test/plugins/blocklist_proxy.js
+++ b/browser/base/content/test/plugins/blocklist_proxy.js
@@ -8,19 +8,19 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
 /*
  * A lightweight blocklist proxy for the testing purposes.
  */
 var BlocklistProxy = {
   _uuid: null,
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsIBlocklistService,
-                                         Ci.nsITimerCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsIBlocklistService,
+                                          Ci.nsITimerCallback]),
 
   init() {
     if (!this._uuid) {
       this._uuid =
         Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator)
                                            .generateUUID();
       Cm.nsIComponentRegistrar.registerFactory(this._uuid, "",
                                                "@mozilla.org/extensions/blocklist;1",
--- a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
+++ b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
@@ -199,17 +199,17 @@ function checkAutocompleteResults(aExpec
         ok(false, "'" + entry + "' should be found in autocomplete");
       }
 
       executeSoon(aCallback);
     },
     setSelectedIndex() {},
     get searchCount() { return this.searches.length; },
     getSearchAt(aIndex) { return this.searches[aIndex]; },
-    QueryInterface: XPCOMUtils.generateQI([
+    QueryInterface: ChromeUtils.generateQI([
       Ci.nsIAutoCompleteInput,
       Ci.nsIAutoCompletePopup,
     ])
   };
 
   info("Searching open pages.");
   gController.startSearch(RESTRICT_TOKEN_OPENPAGE);
 }
--- a/browser/base/content/test/urlbar/browser_urlbar_search_no_speculative_connect_with_client_cert.js
+++ b/browser/base/content/test/urlbar/browser_urlbar_search_no_speculative_connect_with_client_cert.js
@@ -27,17 +27,17 @@ const clientAuthDialogs = {
     ok(expectingChooseCertificate,
        `${expectingChooseCertificate ? "" : "not "}expecting chooseCertificate to be called`);
     is(certList.length, 1, "should have only one client certificate available");
     selectedIndex.value = 0;
     chooseCertificateCalled = true;
     return true;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIClientAuthDialogs]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIClientAuthDialogs]),
 };
 
 function startServer(cert) {
   let tlsServer = Cc["@mozilla.org/network/tls-server-socket;1"]
                     .createInstance(Ci.nsITLSServerSocket);
   tlsServer.init(-1, true, -1);
   tlsServer.serverCert = cert;
 
--- a/browser/base/content/test/urlbar/head.js
+++ b/browser/base/content/test/urlbar/head.js
@@ -53,17 +53,17 @@ function waitForDocLoadAndStopIt(aExpect
           wp.removeProgressListener(progressListener);
 
           let chan = req.QueryInterface(Ci.nsIChannel);
           dump(`waitForDocLoadAndStopIt: Document start: ${chan.URI.spec}\n`);
 
           stopContent(contentStopFromProgressListener, chan.originalURI.spec);
         }
       },
-      QueryInterface: XPCOMUtils.generateQI(["nsISupportsWeakReference"])
+      QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference"])
     };
     wp.addProgressListener(progressListener, wp.NOTIFY_STATE_WINDOW);
 
     /**
      * As |this| is undefined and we can't extend |docShell|, adding an unload
      * event handler is the easiest way to ensure the weakly referenced
      * progress listener is kept alive as long as necessary.
      */
--- a/browser/components/about/nsAboutCapabilities.js
+++ b/browser/components/about/nsAboutCapabilities.js
@@ -62,13 +62,12 @@ nsAboutCapabilities.prototype = {
   },
 
   isWindowPrivate() {
     return PrivateBrowsingUtils.isContentWindowPrivate(this.window);
   },
 
   contractID: "@mozilla.org/aboutcapabilities;1",
   classID: Components.ID("{4c2b1f46-e637-4a91-8108-8a9fb7aab91d}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsAboutCapabilities]);
--- a/browser/components/downloads/DownloadsCommon.jsm
+++ b/browser/components/downloads/DownloadsCommon.jsm
@@ -72,18 +72,18 @@ const kDownloadsStringsRequiringPluralFo
   otherDownloads3: true
 };
 
 const kMaxHistoryResultsForLimitedView = 42;
 
 const kPrefBranch = Services.prefs.getBranch("browser.download.");
 
 var PrefObserver = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
   getPref(name) {
     try {
       switch (typeof this.prefs[name]) {
         case "boolean":
           return kPrefBranch.getBoolPref(name);
       }
     } catch (ex) { }
     return this.prefs[name];
--- a/browser/components/enterprisepolicies/EnterprisePolicies.js
+++ b/browser/components/enterprisepolicies/EnterprisePolicies.js
@@ -64,19 +64,19 @@ function EnterprisePoliciesManager() {
   Services.obs.addObserver(this, "final-ui-startup", true);
   Services.obs.addObserver(this, "sessionstore-windows-restored", true);
   Services.obs.addObserver(this, "EnterprisePolicies:Restart", true);
 }
 
 EnterprisePoliciesManager.prototype = {
   // for XPCOM
   classID:          Components.ID("{ea4e1414-779b-458b-9d1f-d18e8efbc145}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsIEnterprisePolicies]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference,
+                                          Ci.nsIEnterprisePolicies]),
 
   // redefine the default factory for XPCOMUtils
   _xpcom_factory: EnterprisePoliciesFactory,
 
   _initialize() {
     let provider = this._chooseProvider();
 
     if (!provider) {
--- a/browser/components/enterprisepolicies/EnterprisePoliciesContent.js
+++ b/browser/components/enterprisepolicies/EnterprisePoliciesContent.js
@@ -46,17 +46,17 @@ function EnterprisePoliciesManagerConten
 
   Services.cpmm.addMessageListener("EnterprisePolicies:DisallowFeature", this);
   Services.cpmm.addMessageListener("EnterprisePolicies:Restart", this);
 }
 
 EnterprisePoliciesManagerContent.prototype = {
   // for XPCOM
   classID:          Components.ID("{dc6358f8-d167-4566-bf5b-4350b5e6a7a2}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIEnterprisePolicies]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIEnterprisePolicies]),
 
   // redefine the default factory for XPCOMUtils
   _xpcom_factory: EnterprisePoliciesFactory,
 
   _status: Ci.nsIEnterprisePolicies.INACTIVE,
 
   _disallowedFeatures: [],
 
--- a/browser/components/enterprisepolicies/helpers/WebsiteFilter.jsm
+++ b/browser/components/enterprisepolicies/helpers/WebsiteFilter.jsm
@@ -74,18 +74,18 @@ function WebsiteFilter(blocklist, except
   if (exceptionArray.length) {
     this._exceptionsPatterns = new MatchPatternSet(exceptionArray);
   }
 
   Services.obs.addObserver(this, "http-on-modify-request", true);
 }
 
 WebsiteFilter.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
   observe(subject, topic, data) {
     let channel, isDocument = false;
     try {
       channel = subject.QueryInterface(Ci.nsIHttpChannel);
       isDocument = channel.isDocument;
     } catch (e) {
       return;
--- a/browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
+++ b/browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
@@ -155,21 +155,21 @@ add_task(async function test_opensearch_
 
 add_task(async function test_AddSearchProvider() {
   // Mock the modal error dialog
   let mockPrompter = {
     promptCount: 0,
     alert() {
       this.promptCount++;
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt]),
   };
   let windowWatcher = {
     getNewPrompter: () => mockPrompter,
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowWatcher]),
   };
   let origWindowWatcher = Services.ww;
   Services.ww = windowWatcher;
   registerCleanupFunction(() => {
     Services.ww = origWindowWatcher;
   });
 
   let engineURL = getRootDirectory(gTestPath) + "opensearchEngine.xml";
--- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js
@@ -1164,17 +1164,17 @@ this.tabs = class extends ExtensionAPI {
                       resolve(retval == 0 ? "saved" : "replaced");
                     }
                   },
                   onStatusChange: function(webProgress, request, status, message) {
                     if (status != 0) {
                       resolve(retval == 0 ? "not_saved" : "not_replaced");
                     }
                   },
-                  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener]),
+                  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener]),
                 };
 
                 activeTab.linkedBrowser.print(activeTab.linkedBrowser.outerWindowID, printSettings, printProgressListener);
               } else {
                 // Cancel clicked (retval == 1)
                 resolve("canceled");
               }
             });
--- a/browser/components/feeds/FeedWriter.js
+++ b/browser/components/feeds/FeedWriter.js
@@ -976,13 +976,13 @@ FeedWriter.prototype = {
         }
       });
     } else {
       subscribeCallback();
     }
   },
 
   classID: FEEDWRITER_CID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsIDOMGlobalPropertyInitializer])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsIDOMGlobalPropertyInitializer])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FeedWriter]);
--- a/browser/components/feeds/WebContentConverter.js
+++ b/browser/components/feeds/WebContentConverter.js
@@ -860,17 +860,17 @@ WebContentConverterRegistrar.prototype =
     return this.QueryInterface(iid);
   },
 
   classID: WCCR_CLASSID,
 
   /**
    * See nsISupports
    */
-  QueryInterface: XPCOMUtils.generateQI(
+  QueryInterface: ChromeUtils.generateQI(
      [Ci.nsIWebContentConverterService,
       Ci.nsIWebContentHandlerRegistrar,
       Ci.nsIObserver,
       Ci.nsIFactory]),
 
   _xpcom_categories: [{
     category: "app-startup",
     service: true
@@ -1039,17 +1039,17 @@ WebContentConverterRegistrarContent.prot
     return this.QueryInterface(iid);
   },
 
   classID: WCCR_CLASSID,
 
   /**
    * See nsISupports
    */
-  QueryInterface: XPCOMUtils.generateQI(
+  QueryInterface: ChromeUtils.generateQI(
                      [Ci.nsIWebContentHandlerRegistrar,
                       Ci.nsIWebContentConverterService,
                       Ci.nsIFactory])
 };
 
 this.NSGetFactory =
   (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) ?
     XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrarContent]) :
--- a/browser/components/migration/AutoMigrate.jsm
+++ b/browser/components/migration/AutoMigrate.jsm
@@ -674,17 +674,17 @@ const AutoMigrate = {
       return;
     }
 
     let url = Services.urlFormatter.formatURL(rawURL);
     url = url.replace("%IMPORTEDBROWSER%", encodeURIComponent(migrationBrowser));
     chromeWindow.openTrustedLinkIn(url, "tab");
   },
 
-  QueryInterface: XPCOMUtils.generateQI(
+  QueryInterface: ChromeUtils.generateQI(
     [Ci.nsIObserver, Ci.nsINavBookmarkObserver, Ci.nsISupportsWeakReference]
   ),
 
   /**
    * Undo action called by the UndoNotification or by the newtab
    * @param chromeWindow A reference to the window in which to open a link.
    */
   undoAutoMigration(chromeWindow) {
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -80,17 +80,17 @@ function getMigrationBundle() {
  * 3. Set classDescription, contractID and classID for your migrator, and set
  *    NSGetFactory appropriately.
  * 4. If the migrator supports multiple profiles, override the sourceProfiles
  *    Here we default for single-profile migrator.
  * 5. Implement getResources(aProfile) (see below).
  * 6. For startup-only migrators, override |startupOnlyMigrator|.
  */
 var MigratorPrototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
 
   /**
    * OVERRIDE IF AND ONLY IF the source supports multiple profiles.
    *
    * Returns array of profile objects from which data may be imported. The object
    * should have the following keys:
    *   id - a unique string identifier for the profile
    *   name - a pretty name to display to the user in the UI
--- a/browser/components/migration/ProfileMigrator.js
+++ b/browser/components/migration/ProfileMigrator.js
@@ -7,15 +7,15 @@
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/MigrationUtils.jsm");
 
 function ProfileMigrator() {
 }
 
 ProfileMigrator.prototype = {
   migrate: MigrationUtils.startupMigration.bind(MigrationUtils),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIProfileMigrator]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIProfileMigrator]),
   classDescription: "Profile Migrator",
   contractID: "@mozilla.org/toolkit/profile-migrator;1",
   classID: Components.ID("6F8BB968-C14F-4D6F-9733-6C6737B35DCE"),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ProfileMigrator]);
--- a/browser/components/newtab/aboutNewTabService.js
+++ b/browser/components/newtab/aboutNewTabService.js
@@ -87,17 +87,17 @@ AboutNewTabService.prototype = {
   _activityStreamEnabled: false,
   _activityStreamPrerender: false,
   _activityStreamPath: "",
   _activityStreamDebug: false,
   _overridden: false,
   willNotifyUser: false,
 
   classID: Components.ID("{dfcd2adc-7867-4d3a-ba70-17501f208142}"),
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIAboutNewTabService,
     Ci.nsIObserver
   ]),
   _xpcom_categories: [{
     service: true
   }],
 
   observe(subject, topic, data) {
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -281,20 +281,20 @@ nsBrowserContentHandler.prototype = {
     createInstance: function bch_factory_ci(outer, iid) {
       if (outer)
         throw Cr.NS_ERROR_NO_AGGREGATION;
       return gBrowserContentHandler.QueryInterface(iid);
     }
   },
 
   /* nsISupports */
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler,
-                                         Ci.nsIBrowserHandler,
-                                         Ci.nsIContentHandler,
-                                         Ci.nsICommandLineValidator]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLineHandler,
+                                          Ci.nsIBrowserHandler,
+                                          Ci.nsIContentHandler,
+                                          Ci.nsICommandLineValidator]),
 
   /* nsICommandLineHandler */
   handle: function bch_handle(cmdLine) {
     if (cmdLine.handleFlag("browser", false)) {
       openBrowserWindow(cmdLine);
       cmdLine.preventDefault = true;
     }
 
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -2719,18 +2719,18 @@ BrowserGlue.prototype = {
     } else {
       AppMenuNotifications.removeNotification("fxa-needs-authentication");
     }
   },
 
   // for XPCOM
   classID:          Components.ID("{eab9012e-5f74-4cbc-b2b5-a590235513cc}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
   _xpcom_factory: XPCOMUtils.generateSingletonFactory(BrowserGlue),
 };
 
 /**
  * ContentPermissionIntegration is responsible for showing the user
  * simple permission prompts when content requests additional
  * capabilities.
@@ -2779,17 +2779,17 @@ const ContentPermissionIntegration = {
   },
 };
 
 function ContentPermissionPrompt() {}
 
 ContentPermissionPrompt.prototype = {
   classID:          Components.ID("{d8903bf6-68d5-4e97-bcd1-e4d3012f721a}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionPrompt]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionPrompt]),
 
   /**
    * This implementation of nsIContentPermissionPrompt.prompt ensures
    * that there's only one nsIContentPermissionType in the request,
    * and that it's of type nsIContentPermissionType. Failing to
    * satisfy either of these conditions will result in this method
    * throwing NS_ERRORs. If the combined ContentPermissionIntegration
    * cannot construct a prompt for this particular request, an
@@ -3032,17 +3032,17 @@ var DefaultBrowserCheck = {
  */
 var JawsScreenReaderVersionCheck = {
   _prompted: false,
 
   init() {
     Services.obs.addObserver(this, "a11y-init-or-shutdown", true);
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
   observe(subject, topic, data) {
     if (topic == "a11y-init-or-shutdown" && data == "1") {
       Services.tm.dispatchToMainThread(() => this._checkVersionAndPrompt());
     }
   },
 
   onWindowsRestored() {
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -36,17 +36,17 @@ PlacesViewBase.prototype = {
 
   // The xul element that represents the root container.
   _rootElt: null,
 
   // Set to true for views that are represented by native widgets (i.e.
   // the native mac menu).
   _nativeView: false,
 
-  QueryInterface: XPCOMUtils.generateQI(
+  QueryInterface: ChromeUtils.generateQI(
     [Ci.nsINavHistoryResultObserver,
      Ci.nsISupportsWeakReference]),
 
   _place: "",
   get place() {
     return this._place;
   },
   set place(val) {
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -83,17 +83,17 @@ PlacesController.prototype = {
    */
   _view: null,
 
   // This is used in certain views to disable user actions on the places tree
   // views. This avoids accidental deletion/modification when the user is not
   // actually organising the trees.
   disableUserActions: false,
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIClipboardOwner
   ]),
 
   // nsIClipboardOwner
   LosingOwnership: function PC_LosingOwnership(aXferable) {
     this.cutNodes = [];
   },
 
--- a/browser/components/places/content/editBookmark.js
+++ b/browser/components/places/content/editBookmark.js
@@ -460,17 +460,17 @@ var gEditItemOverlay = {
                                       this._folderMenuList.selectedIndex);
 
     // Hide the folders-separator if no folder is annotated as recently-used
     this._element("foldersSeparator").hidden = (menupopup.childNodes.length <= 6);
     this._folderMenuList.disabled = this.readOnly;
   },
 
   QueryInterface:
-  XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
+  ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
 
   _element(aID) {
     return document.getElementById("editBMPanel_" + aID);
   },
 
   uninitPanel(aHideCollapsibleElements) {
     if (aHideCollapsibleElements) {
       // Hide the folder tree if it was previously visible.
--- a/browser/components/places/tests/browser/browser_editBookmark_keywords.js
+++ b/browser/components/places/tests/browser/browser_editBookmark_keywords.js
@@ -11,17 +11,17 @@ add_task(async function() {
         onItemAdded() {},
         onItemRemoved() {},
         onItemVisited() {},
         onItemMoved() {},
         onItemChanged(id, property, isAnno, value) {
           PlacesUtils.bookmarks.removeObserver(this);
           resolve({ property, value });
         },
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
+        QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
       });
     });
   }
 
   let tab = await BrowserTestUtils.openNewForegroundTab({
     gBrowser,
     opening: TEST_URL,
     waitForStateStop: true
--- a/browser/components/places/tests/browser/browser_views_liveupdate.js
+++ b/browser/components/places/tests/browser/browser_views_liveupdate.js
@@ -122,17 +122,17 @@ add_task(async function test() {
   }
 });
 
 /**
  * The observer is where magic happens, for every change we do it will look for
  * nodes positions in the affected views.
  */
 var bookmarksObserver = {
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsINavBookmarkObserver,
     Ci.nsIAnnotationObserver
   ]),
 
   // nsIAnnotationObserver
   onItemAnnotationSet() {},
   onItemAnnotationRemoved() {},
   onPageAnnotationSet() {},
--- a/browser/components/places/tests/unit/head_bookmarks.js
+++ b/browser/components/places/tests/unit/head_bookmarks.js
@@ -71,17 +71,17 @@ function rebuildSmartBookmarks() {
   let consoleListener = {
     observe(aMsg) {
       if (aMsg.message.startsWith("[JavaScript Warning:")) {
         // TODO (Bug 1300416): Ignore spurious strict warnings.
         return;
       }
       do_throw("Got console message: " + aMsg.message);
     },
-    QueryInterface: XPCOMUtils.generateQI([ Ci.nsIConsoleListener ]),
+    QueryInterface: ChromeUtils.generateQI([ Ci.nsIConsoleListener ]),
   };
   Services.console.reset();
   Services.console.registerListener(consoleListener);
   registerCleanupFunction(() => {
     try {
       Services.console.unregisterListener(consoleListener);
     } catch (ex) { /* will likely fail */ }
   });
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -1288,17 +1288,17 @@ var gMainPane = {
     Services.prefs.removeObserver(PREF_AUDIO_FEED_SELECTED_READER, this);
 
     Services.prefs.removeObserver(PREF_CONTAINERS_EXTENSION, this);
   },
 
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   // nsIObserver
 
   async observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed") {
       if (aData == PREF_CONTAINERS_EXTENSION) {
         this.readBrowserContainersCheckbox();
         return;
--- a/browser/components/preferences/in-content/tests/browser_advanced_update.js
+++ b/browser/components/preferences/in-content/tests/browser_advanced_update.js
@@ -13,17 +13,17 @@ const mockUpdateManager = {
   contractId: "@mozilla.org/updates/update-manager;1",
 
   _mockClassId: uuidGenerator.generateUUID(),
 
   _originalClassId: "",
 
   _originalFactory: null,
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateManager]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIUpdateManager]),
 
   createInstance(outer, iiD) {
     if (outer) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(iiD);
   },
 
--- a/browser/components/preferences/translation.js
+++ b/browser/components/preferences/translation.js
@@ -65,17 +65,17 @@ Tree.prototype = {
     return "";
   },
   getColumnProperties(column) {
     return "";
   },
   getCellProperties(row, column) {
     return "";
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView])
 };
 
 function Lang(aCode, label) {
   this.langCode = aCode;
   this._label = label;
 }
 
 Lang.prototype = {
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
@@ -83,17 +83,17 @@ add_task(async function test_toggleTrack
 
   let { win, tab } = await openAboutPrivateBrowsing();
 
   // Set up the observer for the preference change before triggering the action.
   let prefBranch =
       Services.prefs.getBranch("privacy.trackingprotection.pbmode.");
   let waitForPrefChanged = () => new Promise(resolve => {
     let prefObserver = {
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
       observe() {
         prefBranch.removeObserver("enabled", prefObserver);
         resolve();
       },
     };
     prefBranch.addObserver("enabled", prefObserver);
   });
 
--- a/browser/components/search/test/head.js
+++ b/browser/components/search/test/head.js
@@ -88,18 +88,18 @@ let promiseStateChangeFrameScript = "dat
   () => {
     ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
     /* globals docShell, sendAsyncMessage */
 
     const global = this;
     const LISTENER = Symbol("listener");
     let listener = {
-      QueryInterface: XPCOMUtils.generateQI(["nsISupportsWeakReference",
-                                             "nsIWebProgressListener"]),
+      QueryInterface: ChromeUtils.generateQI(["nsISupportsWeakReference",
+                                              "nsIWebProgressListener"]),
 
       onStateChange: function onStateChange(webProgress, req, flags, status) {
         // Only care about top-level document starts
         if (!webProgress.isTopLevel ||
             !(flags & Ci.nsIWebProgressListener.STATE_START)) {
           return;
         }
 
--- a/browser/components/sessionstore/ContentRestore.jsm
+++ b/browser/components/sessionstore/ContentRestore.jsm
@@ -366,17 +366,17 @@ ContentRestoreInternal.prototype = {
 function HistoryListener(docShell, callback) {
   let webNavigation = docShell.QueryInterface(Ci.nsIWebNavigation);
   webNavigation.sessionHistory.legacySHistory.addSHistoryListener(this);
 
   this.webNavigation = webNavigation;
   this.callback = callback;
 }
 HistoryListener.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsISHistoryListener,
     Ci.nsISupportsWeakReference
   ]),
 
   uninstall() {
     let shistory = this.webNavigation.sessionHistory.legacySHistory;
     if (shistory) {
       shistory.removeSHistoryListener(this);
@@ -446,17 +446,17 @@ function ProgressListener(docShell, call
                             .getInterface(Ci.nsIWebProgress);
   webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_WINDOW);
 
   this.webProgress = webProgress;
   this.callbacks = callbacks;
 }
 
 ProgressListener.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIWebProgressListener,
     Ci.nsISupportsWeakReference
   ]),
 
   uninstall() {
     this.webProgress.removeProgressListener(this);
   },
 
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -433,17 +433,17 @@ var SessionStore = {
     }
   },
 };
 
 // Freeze the SessionStore object. We don't want anyone to modify it.
 Object.freeze(SessionStore);
 
 var SessionStoreInternal = {
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference
   ]),
 
   _globalState: new GlobalState(),
 
   // A counter to be used to generate a unique ID for each closed tab or window.
   _nextClosedId: 0,
--- a/browser/components/sessionstore/content/content-sessionStore.js
+++ b/browser/components/sessionstore/content/content-sessionStore.js
@@ -137,18 +137,18 @@ var StateChangeNotifier = {
 
     if (stateFlags & Ci.nsIWebProgressListener.STATE_START) {
       this.notifyObservers("onPageLoadStarted");
     } else if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
       this.notifyObservers("onPageLoadCompleted");
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                          Ci.nsISupportsWeakReference])
 };
 
 /**
  * Listens for and handles content events that we need for the
  * session store service to be notified of state changes in content.
  */
 var EventListener = {
 
@@ -442,17 +442,17 @@ var SessionHistoryListener = {
   OnLengthChanged(aCount) {
     // Ignore, the method is implemented so that XPConnect doesn't throw!
   },
 
   OnIndexChanged(aIndex) {
     // Ignore, the method is implemented so that XPConnect doesn't throw!
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsISHistoryListener,
     Ci.nsISupportsWeakReference
   ])
 };
 
 /**
  * Listens for scroll position changes. Whenever the user scrolls the top-most
  * frame we update the scroll position and will restore it when requested.
@@ -694,18 +694,18 @@ var PrivacyListener = {
     }
   },
 
   // Ci.nsIPrivacyTransitionObserver
   privateModeChanged(enabled) {
     MessageQueue.push("isPrivate", () => enabled || null);
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrivacyTransitionObserver,
-                                         Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPrivacyTransitionObserver,
+                                          Ci.nsISupportsWeakReference])
 };
 
 /**
  * A message queue that takes collected data and will take care of sending it
  * to the chrome process. It allows flushing using synchronous messages and
  * takes care of any race conditions that might occur because of that. Changes
  * will be batched if they're pushed in quick succession to avoid a message
  * flood.
--- a/browser/components/sessionstore/nsSessionStartup.js
+++ b/browser/components/sessionstore/nsSessionStartup.js
@@ -351,15 +351,15 @@ SessionStartup.prototype = {
   /**
    * Get whether the previous session crashed.
    */
   get previousSessionCrashed() {
     return this._previousSessionCrashed;
   },
 
   /* ........ QueryInterface .............. */
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsISessionStartup]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference,
+                                          Ci.nsISessionStartup]),
   classID: Components.ID("{ec7a6c20-e081-11da-8ad9-0800200c9a66}")
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SessionStartup]);
--- a/browser/components/sessionstore/test/browser_599909.js
+++ b/browser/components/sessionstore/test/browser_599909.js
@@ -106,17 +106,17 @@ function checkAutocompleteResults(aExpec
 
       executeSoon(aCallback);
     },
     setSelectedIndex() {},
     get searchCount() { return this.searches.length; },
     getSearchAt(aIndex) {
       return this.searches[aIndex];
     },
-    QueryInterface: XPCOMUtils.generateQI([
+    QueryInterface: ChromeUtils.generateQI([
       Ci.nsIAutoCompleteInput,
       Ci.nsIAutoCompletePopup,
     ])
   };
 
   info("Searching open pages.");
   gController.startSearch(RESTRICT_TOKEN_OPENPAGE);
 }
--- a/browser/components/sessionstore/test/browser_async_remove_tab.js
+++ b/browser/components/sessionstore/test/browser_async_remove_tab.js
@@ -43,17 +43,17 @@ function promiseNewLocationAndHistoryEnt
 
     return new Promise(resolve => {
       let listener = {
         OnHistoryReplaceEntry() {
           shistory.removeSHistoryListener(this);
           resolve();
         },
 
-        QueryInterface: XPCOMUtils.generateQI([
+        QueryInterface: ChromeUtils.generateQI([
           Ci.nsISHistoryListener,
           Ci.nsISupportsWeakReference
         ])
       };
 
       shistory.addSHistoryListener(listener);
 
       /* Keep the weak shistory listener alive. */
@@ -73,17 +73,17 @@ function promiseHistoryEntryReplacedNonR
     let shistory = browser.webNavigation.sessionHistory.legacySHistory;
 
     let listener = {
       OnHistoryReplaceEntry() {
         shistory.removeSHistoryListener(this);
         executeSoon(resolve);
       },
 
-      QueryInterface: XPCOMUtils.generateQI([
+      QueryInterface: ChromeUtils.generateQI([
         Ci.nsISHistoryListener,
         Ci.nsISupportsWeakReference
       ])
     };
 
     shistory.addSHistoryListener(listener);
     listeners.set(browser, listener);
   });
--- a/browser/components/sessionstore/test/browser_not_collect_when_idle.js
+++ b/browser/components/sessionstore/test/browser_not_collect_when_idle.js
@@ -20,17 +20,17 @@ var idleService = {
 
   _fireObservers(state) {
     for (let observer of this._observers.values()) {
       observer.observe(observer, state, null);
       this._activity.observerFires.push(state);
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIIdleService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIIdleService]),
   idleTime: 19999,
 
   addIdleObserver(observer, time) {
     this._observers.add(observer);
     this._activity.addCalls.push(time);
   },
 
   removeIdleObserver(observer, time) {
--- a/browser/components/sessionstore/test/browser_parentProcessRestoreHash.js
+++ b/browser/components/sessionstore/test/browser_parentProcessRestoreHash.js
@@ -7,17 +7,17 @@ const SELFCHROMEURL =
 const Cm = Components.manager;
 
 const TESTCLASSID = "78742c04-3630-448c-9be3-6c5070f062de";
 
 const TESTURL = "about:testpageforsessionrestore#foo";
 
 
 let TestAboutPage = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
   getURIFlags(aURI) {
     // No CAN_ or MUST_LOAD_IN_CHILD means this loads in the parent:
     return Ci.nsIAboutModule.ALLOW_SCRIPT |
            Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
            Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT;
   },
 
   newChannel(aURI, aLoadInfo) {
--- a/browser/components/sessionstore/test/content.js
+++ b/browser/components/sessionstore/test/content.js
@@ -41,17 +41,17 @@ var historyListener = {
     sendAsyncMessage("ss-test:OnHistoryReload");
     return true;
   },
 
   OnHistoryReplaceEntry() {
     sendAsyncMessage("ss-test:OnHistoryReplaceEntry");
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsISHistoryListener,
     Ci.nsISupportsWeakReference
   ])
 };
 
 var {sessionHistory} = docShell.QueryInterface(Ci.nsIWebNavigation);
 if (sessionHistory) {
   sessionHistory.legacySHistory.addSHistoryListener(historyListener);
--- a/browser/components/shell/HeadlessShell.jsm
+++ b/browser/components/shell/HeadlessShell.jsm
@@ -34,18 +34,18 @@ function loadContentWindow(webNavigation
         let contentWindow = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                                     .getInterface(Ci.nsIDOMWindow);
         progressListeners.delete(progressListener);
         webProgress.removeProgressListener(progressListener);
         contentWindow.addEventListener("load", (event) => {
           resolve(contentWindow);
         }, { once: true });
       },
-      QueryInterface: XPCOMUtils.generateQI(["nsIWebProgressListener",
-                                             "nsISupportsWeakReference"])
+      QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
+                                              "nsISupportsWeakReference"])
     };
     progressListeners.set(progressListener, progressListener);
     webProgress.addProgressListener(progressListener,
                                     Ci.nsIWebProgress.NOTIFY_LOCATION);
   });
 }
 
 async function takeScreenshot(fullWidth, fullHeight, contentWidth, contentHeight, path, url) {
--- a/browser/components/tests/browser/browser_contentpermissionprompt.js
+++ b/browser/components/tests/browser/browser_contentpermissionprompt.js
@@ -21,17 +21,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
  *        Example: "geo", "desktop-notification".
  * @return nsIContentPermissionType implementation.
  */
 function MockContentPermissionType(type) {
   this.type = type;
 }
 
 MockContentPermissionType.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionType]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionType]),
   // We expose the wrappedJSObject so that we can be sure
   // in some of our tests that we're passing the right
   // nsIContentPermissionType around.
   wrappedJSObject: this,
 };
 
 /**
  * This is a partial implementation of nsIContentPermissionRequest.
@@ -44,17 +44,17 @@ MockContentPermissionType.prototype = {
 function MockContentPermissionRequest(typesArray) {
   this.types = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
   for (let type of typesArray) {
     this.types.appendElement(type);
   }
 }
 
 MockContentPermissionRequest.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionRequest]),
   // We expose the wrappedJSObject so that we can be sure
   // in some of our tests that we're passing the right
   // nsIContentPermissionRequest around.
   wrappedJSObject: this,
   // For some of our tests, we want to make sure that the
   // request is cancelled, so we add some instrumentation here
   // to check that cancel() is called.
   cancel() {
@@ -95,17 +95,17 @@ add_task(async function test_multiple_ty
 
 /**
  * Tests that if the nsIContentPermissionRequest has a type that
  * does not implement nsIContentPermissionType that NS_NOINTERFACE
  * is thrown, and the request is cancelled.
  */
 add_task(async function test_not_permission_type() {
   let mockRequest = new MockContentPermissionRequest([
-    { QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]) },
+    { QueryInterface: ChromeUtils.generateQI([]) },
   ]);
 
   Assert.throws(() => { ContentPermissionPrompt.prompt(mockRequest); },
                 /NS_NOINTERFACE/);
   Assert.ok(mockRequest.cancelled, "Should have cancelled the request.");
 });
 
 /**
--- a/browser/components/tests/startupRecorder.js
+++ b/browser/components/tests/startupRecorder.js
@@ -52,17 +52,17 @@ function startupRecorder() {
     code: {},
     prefStats: {},
   };
   this.done = new Promise(resolve => { this._resolve = resolve; });
 }
 startupRecorder.prototype = {
   classID: Components.ID("{11c095b2-e42e-4bdf-9dd0-aed87595f6a4}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   record(name) {
     if (!Services.prefs.getBoolPref("browser.startup.record", false))
       return;
 
     this.data.code[name] = {
       components: this.loader.loadedComponents(),
       modules: this.loader.loadedModules(),
--- a/browser/components/translation/TranslationContentHandler.jsm
+++ b/browser/components/translation/TranslationContentHandler.jsm
@@ -100,18 +100,18 @@ TranslationContentHandler.prototype = {
         state: STATE_OFFER,
         originalShown: true,
         detectedLanguage: result.language
       };
       this.global.sendAsyncMessage("Translation:DocumentState", data);
     });
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                          Ci.nsISupportsWeakReference]),
 
   receiveMessage(msg) {
     switch (msg.name) {
       case "Translation:TranslateDocument":
       {
         ChromeUtils.import("resource:///modules/translation/TranslationDocument.jsm");
 
         // If a TranslationDocument already exists for this document, it should
--- a/browser/components/uitour/test/browser_UITour_defaultBrowser.js
+++ b/browser/components/uitour/test/browser_UITour_defaultBrowser.js
@@ -5,17 +5,17 @@ var gContentAPI;
 var gContentWindow;
 var setDefaultBrowserCalled = false;
 
 Services.scriptloader
   .loadSubScript("chrome://mochikit/content/tests/SimpleTest/MockObjects.js", this);
 
 function MockShellService() {}
 MockShellService.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIShellService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIShellService]),
   isDefaultBrowser(aStartupCheck, aForAllTypes) { return false; },
   setDefaultBrowser(aClaimAllTypes, aForAllUsers) {
     setDefaultBrowserCalled = true;
   },
   shouldCheckDefaultBrowser: false,
   canSetDesktopBackground: false,
   BACKGROUND_TILE: 1,
   BACKGROUND_STRETCH: 2,
--- a/browser/extensions/activity-stream/lib/PlacesFeed.jsm
+++ b/browser/extensions/activity-stream/lib/PlacesFeed.jsm
@@ -17,17 +17,17 @@ const LINK_BLOCKED_EVENT = "newtab-linkB
 const PLACES_LINKS_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for places links changed events
 
 /**
  * Observer - a wrapper around history/bookmark observers to add the QueryInterface.
  */
 class Observer {
   constructor(dispatch, observerInterface) {
     this.dispatch = dispatch;
-    this.QueryInterface = XPCOMUtils.generateQI([observerInterface, Ci.nsISupportsWeakReference]);
+    this.QueryInterface = ChromeUtils.generateQI([observerInterface, Ci.nsISupportsWeakReference]);
   }
 }
 
 /**
  * HistoryObserver - observes events from PlacesUtils.history
  */
 class HistoryObserver extends Observer {
   constructor(dispatch) {
--- a/browser/extensions/followonsearch/content/followonsearch-fs.js
+++ b/browser/extensions/followonsearch/content/followonsearch-fs.js
@@ -145,17 +145,17 @@ gLastSearchQueue.push = function(...args
 // that started from Firefox
 let searchingGoogle = false;
 
 /**
  * Since most codes are in the URL, we can handle them via
  * a progress listener.
  */
 var webProgressListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
   onLocationChange(aWebProgress, aRequest, aLocation, aFlags)
   {
     if (aWebProgress.DOMWindow && (aWebProgress.DOMWindow != content)) {
       return;
     }
     try {
       if (!aWebProgress.isTopLevel ||
           // Not a URL
--- a/browser/extensions/formautofill/FormAutofillContent.jsm
+++ b/browser/extensions/formautofill/FormAutofillContent.jsm
@@ -76,17 +76,17 @@ AutocompleteFactory.prototype = {
  */
 function AutofillProfileAutoCompleteSearch() {
   FormAutofillUtils.defineLazyLogGetter(this, "AutofillProfileAutoCompleteSearch");
 }
 AutofillProfileAutoCompleteSearch.prototype = {
   classID: Components.ID("4f9f1e4c-7f2c-439e-9c9e-566b68bc187d"),
   contractID: "@mozilla.org/autocomplete/search;1?name=autofill-profiles",
   classDescription: "AutofillProfileAutoCompleteSearch",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteSearch]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch]),
 
   // Begin nsIAutoCompleteSearch implementation
 
   /**
    * Searches for a given string and notifies a listener (either synchronously
    * or asynchronously) of the result
    *
    * @param {string} searchString the string to search for
@@ -204,17 +204,17 @@ AutofillProfileAutoCompleteSearch.protot
       });
 
       Services.cpmm.sendAsyncMessage("FormAutofill:GetRecords", data);
     });
   },
 };
 
 let ProfileAutocomplete = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   lastProfileAutoCompleteResult: null,
   lastProfileAutoCompleteFocusedInput: null,
   _registered: false,
   _factory: null,
 
   ensureRegistered() {
     if (this._registered) {
@@ -319,17 +319,17 @@ let ProfileAutocomplete = {
 };
 
 /**
  * Handles content's interactions for the process.
  *
  * NOTE: Declares it by "var" to make it accessible in unit tests.
  */
 var FormAutofillContent = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver]),
   /**
    * @type {WeakMap} mapping FormLike root HTML elements to FormAutofillHandler objects.
    */
   _formsDetails: new WeakMap(),
 
   /**
    * @type {Set} Set of the fields with usable values in any saved profile.
    */
--- a/browser/extensions/formautofill/FormAutofillParent.jsm
+++ b/browser/extensions/formautofill/FormAutofillParent.jsm
@@ -64,17 +64,17 @@ function FormAutofillParent() {
       this._updateSavedFieldNames();
     });
 
     return formAutofillStorage;
   });
 }
 
 FormAutofillParent.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   /**
    * Cache of the Form Autofill status (considering preferences and storage).
    */
   _active: null,
 
   /**
    * The status of Form Autofill's initialization.
--- a/browser/extensions/formautofill/MasterPassword.jsm
+++ b/browser/extensions/formautofill/MasterPassword.jsm
@@ -172,17 +172,17 @@ var MasterPassword = {
     if (!this.isUIBusy) {
       log.debug("waitForExistingDialog: Dialog isn't showing. isLoggedIn:", this.isLoggedIn);
       return this.isLoggedIn;
     }
 
     return new Promise((resolve) => {
       log.debug("waitForExistingDialog: Observing the open dialog");
       let observer = {
-        QueryInterface: XPCOMUtils.generateQI([
+        QueryInterface: ChromeUtils.generateQI([
           Ci.nsIObserver,
           Ci.nsISupportsWeakReference,
         ]),
 
         observe(subject, topic, data) {
           log.debug("waitForExistingDialog: Got notification:", topic);
           // Only run observer once.
           Services.obs.removeObserver(this, "passwordmgr-crypto-login");
--- a/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm
+++ b/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm
@@ -21,17 +21,17 @@ class ProfileAutoCompleteResult {
   constructor(searchString, focusedFieldName, allFieldNames, matchingProfiles, {
     resultCode = null,
     isSecure = true,
     isInputAutofilled = false,
   }) {
     log.debug("Constructing new ProfileAutoCompleteResult:", [...arguments]);
 
     // nsISupports
-    this.QueryInterface = XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult]);
+    this.QueryInterface = ChromeUtils.generateQI([Ci.nsIAutoCompleteResult]);
 
     // The user's query string
     this.searchString = searchString;
     // The field name of the focused input.
     this._focusedFieldName = focusedFieldName;
     // The matching profiles contains the information for filling forms.
     this._matchingProfiles = matchingProfiles;
     // The default item that should be entered if none is selected
--- a/browser/extensions/formautofill/test/unit/test_masterPassword.js
+++ b/browser/extensions/formautofill/test/unit/test_masterPassword.js
@@ -41,24 +41,24 @@ let gMockPrompter = {
           "Please enter your master password.",
           "password prompt text should be as expected");
     equal(checkMsg, null, "checkMsg should be null");
     ok(this.passwordToTry, "passwordToTry should be non-null");
     password.value = this.passwordToTry;
     return true;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt]),
 };
 
 // Mock nsIWindowWatcher. PSM calls getNewPrompter on this to get an nsIPrompt
 // to call promptPassword. We return the mock one, above.
 let gWindowWatcher = {
   getNewPrompter: () => gMockPrompter,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowWatcher]),
 };
 
 // Ensure that the appropriate initialization has happened.
 do_get_profile();
 
 let windowWatcherCID =
   MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
                          gWindowWatcher);
--- a/browser/extensions/pdfjs/content/PdfJs.jsm
+++ b/browser/extensions/pdfjs/content/PdfJs.jsm
@@ -122,17 +122,17 @@ Factory.prototype = {
     if (this._classID2) {
       registrar.unregisterFactory(this._classID2, this._factory);
     }
     this._factory = null;
   },
 };
 
 var PdfJs = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
   _registered: false,
   _initialized: false,
 
   init: function init(remote) {
     if (Services.appinfo.processType !==
         Services.appinfo.PROCESS_TYPE_DEFAULT) {
       throw new Error("PdfJs.init should only get called " +
                       "in the parent process.");
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -804,22 +804,17 @@ PdfStreamConverter.prototype = {
   // properties required for XPCOM registration:
   classID: Components.ID("{d0c5195d-e798-49d4-b1d3-9324328b2291}"),
   classDescription: "pdf.js Component",
   contractID: "@mozilla.org/streamconv;1?from=application/pdf&to=*/*",
 
   classID2: Components.ID("{d0c5195d-e798-49d4-b1d3-9324328b2292}"),
   contractID2: "@mozilla.org/streamconv;1?from=application/pdf&to=text/html",
 
-  QueryInterface: XPCOMUtils.generateQI([
-      Ci.nsISupports,
-      Ci.nsIStreamConverter,
-      Ci.nsIStreamListener,
-      Ci.nsIRequestObserver
-  ]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamConverter, Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   /*
    * This component works as such:
    * 1. asyncConvertData stores the listener
    * 2. onStartRequest creates a new channel, streams the viewer
    * 3. If range requests are supported:
    *      3.1. Leave the request open until the viewer is ready to switch to
    *           range requests.
--- a/browser/extensions/pocket/content/AboutPocket.jsm
+++ b/browser/extensions/pocket/content/AboutPocket.jsm
@@ -25,17 +25,17 @@ function AboutPage(chromeURL, aboutHost,
   this.chromeURL = chromeURL;
   this.aboutHost = aboutHost;
   this.classID = Components.ID(classID);
   this.description = description;
   this.uriFlags = uriFlags;
 }
 
 AboutPage.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
   getURIFlags(aURI) { // eslint-disable-line no-unused-vars
     return this.uriFlags;
   },
 
   newChannel(aURI, aLoadInfo) {
     let newURI = Services.io.newURI(this.chromeURL);
     let channel = Services.io.newChannelFromURIWithLoadInfo(newURI,
                                                             aLoadInfo);
--- a/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm
+++ b/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm
@@ -103,17 +103,17 @@ let WebCompatReporter = {
       `${WebCompatReporter.endpoint}?${params}`,
       {inBackground: false, triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});
 
     // If we successfully got a screenshot blob, add a listener to know when
     // the new tab is loaded before sending it over.
     if (tabData && tabData.blob) {
       let browser = gBrowser.getBrowserForTab(tab);
       let loadedListener = {
-        QueryInterface: XPCOMUtils.generateQI(["nsIWebProgressListener",
+        QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
           "nsISupportsWeakReference"]),
         onStateChange(webProgress, request, flags, status) {
           let isStopped = flags & Ci.nsIWebProgressListener.STATE_STOP;
           let isNetwork = flags & Ci.nsIWebProgressListener.STATE_IS_NETWORK;
           if (isStopped && isNetwork && webProgress.isTopLevel) {
             let location;
             try {
               location = request.QueryInterface(Ci.nsIChannel).URI;
--- a/browser/modules/BrowserUsageTelemetry.jsm
+++ b/browser/modules/BrowserUsageTelemetry.jsm
@@ -222,18 +222,18 @@ let URICountListener = {
 
   /**
    * Reset the counts. This should be called when breaking a session in Telemetry.
    */
   reset() {
     this._domainSet.clear();
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                          Ci.nsISupportsWeakReference]),
 };
 
 let urlbarListener = {
 
   // This is needed for recordUrlbarSelectedResultMethod().
   selectedIndex: -1,
 
   init() {
@@ -307,18 +307,18 @@ let urlbarListener = {
               .getKeyedHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX_BY_TYPE")
               .add(actionType, idx);
     } else {
       Cu.reportError("Unknown FX_URLBAR_SELECTED_RESULT_TYPE type: " +
                      actionType);
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 };
 
 let BrowserUsageTelemetry = {
   _inited: false,
 
   init() {
     this._lastRecordTabCount = 0;
     urlbarListener.init();
@@ -336,18 +336,18 @@ let BrowserUsageTelemetry = {
     const counts = getOpenTabsAndWinsCounts();
     Services.telemetry.scalarSetMaximum(MAX_TAB_COUNT_SCALAR_NAME, counts.tabCount);
     Services.telemetry.scalarSetMaximum(MAX_WINDOW_COUNT_SCALAR_NAME, counts.winCount);
 
     // Reset the URI counter.
     URICountListener.reset();
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
   uninit() {
     if (!this._inited) {
       return;
     }
     Services.obs.removeObserver(this, DOMWINDOW_OPENED_TOPIC);
     Services.obs.removeObserver(this, TELEMETRY_SUBSESSIONSPLIT_TOPIC);
     urlbarListener.uninit();
--- a/browser/modules/FormSubmitObserver.jsm
+++ b/browser/modules/FormSubmitObserver.jsm
@@ -222,10 +222,10 @@ FormSubmitObserver.prototype =
     if (this._content == null) {
       return true;
     }
     let target = aEvent.originalTarget;
     return (target == this._content.document ||
             (target.ownerDocument && target.ownerDocument == this._content.document));
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver])
 };
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -265,17 +265,17 @@ var Sanitizer = {
         if (this.shouldSanitizeOnShutdown) {
           let itemsToClear = getItemsToClearFromPrefBranch(Sanitizer.PREF_SHUTDOWN_BRANCH);
           addPendingSanitization("shutdown", itemsToClear, {});
         }
       }
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsiObserver,
     Ci.nsISupportsWeakReference
   ]),
 
   // When making any changes to the sanitize implementations here,
   // please check whether the changes are applicable to Android
   // (mobile/android/modules/Sanitizer.jsm) as well.
 
--- a/browser/modules/SiteDataManager.jsm
+++ b/browser/modules/SiteDataManager.jsm
@@ -106,17 +106,17 @@ var SiteDataManager = {
       // Needs to root the observer since cache service keeps only a weak reference.
       this._getCacheSizeObserver = {
         onNetworkCacheDiskConsumption: consumption => {
           resolve(consumption);
           this._getCacheSizePromise = null;
           this._getCacheSizeObserver = null;
         },
 
-        QueryInterface: XPCOMUtils.generateQI([
+        QueryInterface: ChromeUtils.generateQI([
           Ci.nsICacheStorageConsumptionObserver,
           Ci.nsISupportsWeakReference
         ])
       };
 
       try {
         Services.cache2.asyncGetDiskConsumption(this._getCacheSizeObserver);
       } catch (e) {
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -150,17 +150,17 @@ function PreviewController(win, tab) {
   XPCOMUtils.defineLazyGetter(this, "canvasPreview", function() {
     let canvas = PageThumbs.createCanvas();
     canvas.mozOpaque = true;
     return canvas;
   });
 }
 
 PreviewController.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsITaskbarPreviewController]),
 
   destroy() {
     this.tab.removeEventListener("TabAttrModified", this);
 
     // Break cycles, otherwise we end up leaking the window with everything
     // attached to it.
     delete this.win;
     delete this.preview;
@@ -830,17 +830,17 @@ var AeroPeek = {
           if (tab.getAttribute("image") == newValue) {
             win.onLinkIconAvailable(tab.linkedBrowser, newValue);
           }
         }
       }
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsISupportsWeakReference,
     Ci.nsINavHistoryObserver,
     Ci.nsIObserver
   ]),
 };
 
 XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", () =>
   Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer)
--- a/browser/modules/test/browser/browser_UsageTelemetry_domains.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_domains.js
@@ -26,17 +26,17 @@ function browserLocationChanged(browser)
       onStatusChange() {},
       onLocationChange(aWebProgress, aRequest, aURI, aFlags) {
         if (!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE)) {
           browser.webProgress.removeProgressListener(filter);
           filter.removeProgressListener(wpl);
           resolve();
         }
       },
-      QueryInterface: XPCOMUtils.generateQI([
+      QueryInterface: ChromeUtils.generateQI([
         Ci.nsIWebProgressListener,
         Ci.nsIWebProgressListener2,
       ]),
     };
     const filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
                      .createInstance(Ci.nsIWebProgress);
     filter.addProgressListener(wpl, Ci.nsIWebProgress.NOTIFY_ALL);
     browser.webProgress.addProgressListener(filter, Ci.nsIWebProgress.NOTIFY_ALL);
--- a/browser/modules/test/browser/contentSearch.js
+++ b/browser/modules/test/browser/contentSearch.js
@@ -64,17 +64,17 @@ function waitForLoadAndStopIt(expectedUR
           if ((flags & docStart) && webProg.isTopLevel && url == expectedURL) {
             webProgress.removeProgressListener(webProgressListener);
             webProgressListener = null;
             req.cancel(Cr.NS_ERROR_FAILURE);
             resolve(url);
           }
         }
       },
-      QueryInterface: XPCOMUtils.generateQI([
+      QueryInterface: ChromeUtils.generateQI([
         Ci.nsIWebProgressListener,
         Ci.nsISupportsWeakReference,
       ]),
     };
     webProgress.addProgressListener(webProgressListener, Ci.nsIWebProgress.NOTIFY_ALL);
     dump("waitForLoadAndStopIt: Waiting for URL to load: " + expectedURL + "\n");
   });
 }
--- a/browser/modules/test/browser/formValidation/browser_form_validation.js
+++ b/browser/modules/test/browser/formValidation/browser_form_validation.js
@@ -44,17 +44,17 @@ function checkPopupShow() {
 }
 
 function checkPopupHide() {
   ok(gInvalidFormPopup.state != "showing" && gInvalidFormPopup.state != "open",
      "[Test " + testId + "] The invalid form popup should not be shown");
 }
 
 var gObserver = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver]),
 
   notifyInvalidSubmit(aFormElement, aInvalidElements) {
   }
 };
 
 var testId = 0;
 
 function incrementTest() {
--- a/browser/modules/test/browser/head.js
+++ b/browser/modules/test/browser/head.js
@@ -165,33 +165,33 @@ function checkEvents(events, expectedEve
  * @param browser (<xul:browser>)
  *        The browser that we'll create a nsIContentPermissionRequest
  *        for.
  * @returns A nsIContentPermissionRequest-ish object.
  */
 function makeMockPermissionRequest(browser) {
   let type = {
     options: [],
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionType]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionType]),
   };
   let types = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
   types.appendElement(type);
   let result = {
     types,
     principal: browser.contentPrincipal,
     requester: null,
     _cancelled: false,
     cancel() {
       this._cancelled = true;
     },
     _allowed: false,
     allow() {
       this._allowed = true;
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionRequest]),
   };
 
   // In the e10s-case, nsIContentPermissionRequest will have
   // element defined. window is defined otherwise.
   if (browser.isRemoteBrowser) {
     result.element = browser;
   } else {
     result.window = browser.contentWindow;
--- a/caps/tests/mochitest/test_extensionURL.html
+++ b/caps/tests/mochitest/test_extensionURL.html
@@ -86,17 +86,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   // to this process' ExtensionProtocolHandler to observe substitutions
   // as they are propagated to the child.
   function SubstitutionObserver() {}
   SubstitutionObserver.prototype = {
     onSetSubstitution: SpecialPowers.wrapCallback(function(root, uri) {
       popSubstitutionCallback(root);
     }),
     QueryInterface:
-      XPCOMUtils.generateQI([SpecialPowers.Ci.nsISupports,
+      ChromeUtils.generateQI([SpecialPowers.Ci.nsISupports,
           SpecialPowers.Ci.nsISubstitutionObserver]),
   };
   var observer = new SubstitutionObserver();
   var wrappedObserver = SpecialPowers.wrap(observer);
   extensionHandler.addObserver(wrappedObserver);
 
   // Set a substitution in the parent. The parent
   // propagates all substitutions to child processes.
--- a/chrome/test/unit/test_no_remote_registration.js
+++ b/chrome/test/unit/test_no_remote_registration.js
@@ -29,17 +29,17 @@ ProtocolHandler.prototype =
       mutator.setSpec(aBaseURI.resolve(aSpec));
     } else {
       mutator.setSpec(aSpec);
     }
     return mutator.finalize();
   },
   newChannel2() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; },
   newChannel() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; },
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIProtocolHandler
   ])
 };
 
 var testProtocols = [
   // It doesn't matter if it has this flag - the only flag we accept is
   // URI_IS_LOCAL_RESOURCE.
   {scheme: "moz-protocol-ui-resource",
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_network_requests_from_chrome.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_network_requests_from_chrome.js
@@ -9,17 +9,17 @@
 "use strict";
 
 const TEST_URI = "http://example.com/";
 
 add_task(async function() {
   // Start a listener on the console service.
   let good = true;
   const listener = {
-    QueryInterface: XPCOMUtils.generateQI([ Ci.nsIObserver ]),
+    QueryInterface: ChromeUtils.generateQI([ Ci.nsIObserver ]),
     observe: function(subject) {
       if (subject instanceof Ci.nsIScriptError &&
           subject.category === "XPConnect JavaScript" &&
           subject.sourceName.includes("webconsole")) {
         good = false;
       }
     }
   };
--- a/devtools/client/webconsole/test/mochitest/browser_webconsole_observer_notifications.js
+++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_observer_notifications.js
@@ -19,17 +19,17 @@ add_task(async function() {
   await closeTabAndToolbox(gBrowser.selectedTab);
   await waitFor(() => destroyed);
 });
 
 function setupObserver() {
   const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", {});
 
   const observer = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
     observe: function observe(subject, topic) {
       subject = subject.QueryInterface(Ci.nsISupportsString);
 
       switch (topic) {
         case "web-console-created":
           ok(HUDService.getHudReferenceById(subject.data), "We have a hud reference");
           Services.obs.removeObserver(observer, "web-console-created");
--- a/devtools/startup/aboutdebugging-registration.js
+++ b/devtools/startup/aboutdebugging-registration.js
@@ -16,17 +16,17 @@ const { nsIAboutModule } = Ci;
 function AboutDebugging() {}
 
 AboutDebugging.prototype = {
   uri: Services.io.newURI("chrome://devtools/content/aboutdebugging/aboutdebugging.xhtml"),
   classDescription: "about:debugging",
   classID: Components.ID("1060afaf-dc9e-43da-8646-23a2faf48493"),
   contractID: "@mozilla.org/network/protocol/about;1?what=debugging",
 
-  QueryInterface: XPCOMUtils.generateQI([nsIAboutModule]),
+  QueryInterface: ChromeUtils.generateQI([nsIAboutModule]),
 
   newChannel: function(uri, loadInfo) {
     let chan = Services.io.newChannelFromURIWithLoadInfo(
       this.uri,
       loadInfo
     );
     chan.owner = Services.scriptSecurityManager.getSystemPrincipal();
     return chan;
--- a/devtools/startup/aboutdevtools/aboutdevtools-registration.js
+++ b/devtools/startup/aboutdevtools/aboutdevtools-registration.js
@@ -14,17 +14,17 @@ const { nsIAboutModule } = Ci;
 function AboutDevtools() {}
 
 AboutDevtools.prototype = {
   uri: Services.io.newURI("chrome://devtools-startup/content/aboutdevtools/aboutdevtools.xhtml"),
   classDescription: "about:devtools",
   classID: Components.ID("3a16d383-92bd-4c24-ac10-0e2bd66883ab"),
   contractID: "@mozilla.org/network/protocol/about;1?what=devtools",
 
-  QueryInterface: XPCOMUtils.generateQI([nsIAboutModule]),
+  QueryInterface: ChromeUtils.generateQI([nsIAboutModule]),
 
   newChannel: function(uri, loadInfo) {
     let chan = Services.io.newChannelFromURIWithLoadInfo(
       this.uri,
       loadInfo
     );
     chan.owner = Services.scriptSecurityManager.getSystemPrincipal();
     return chan;
--- a/devtools/startup/aboutdevtoolstoolbox-registration.js
+++ b/devtools/startup/aboutdevtoolstoolbox-registration.js
@@ -15,17 +15,17 @@ const { nsIAboutModule } = Ci;
 function AboutDevtoolsToolbox() {}
 
 AboutDevtoolsToolbox.prototype = {
   uri: Services.io.newURI("chrome://devtools/content/framework/toolbox.xul"),
   classDescription: "about:devtools-toolbox",
   classID: Components.ID("11342911-3135-45a8-8d71-737a2b0ad469"),
   contractID: "@mozilla.org/network/protocol/about;1?what=devtools-toolbox",
 
-  QueryInterface: XPCOMUtils.generateQI([nsIAboutModule]),
+  QueryInterface: ChromeUtils.generateQI([nsIAboutModule]),
 
   newChannel: function(uri, loadInfo) {
     let chan = Services.io.newChannelFromURIWithLoadInfo(this.uri, loadInfo);
     chan.owner = Services.scriptSecurityManager.getSystemPrincipal();
     return chan;
   },
 
   getURIFlags: function(uri) {
--- a/docshell/test/browser/browser_bug655270.js
+++ b/docshell/test/browser/browser_bug655270.js
@@ -48,13 +48,13 @@ function test() {
 
     onBeginUpdateBatch: function() { },
     onEndUpdateBatch: function() { },
     onVisits: function() { },
     onTitleChanged: function() { },
     onDeleteURI: function() { },
     onClearHistory: function() { },
     onDeleteVisits: function() { },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsINavHistoryObserver])
   };
 
   PlacesUtils.history.addObserver(observer);
 }
--- a/docshell/test/browser/browser_bug670318.js
+++ b/docshell/test/browser/browser_bug670318.js
@@ -46,18 +46,18 @@ add_task(async function test() {
         OnHistoryReplaceEntry: () => {
           // The initial load of about:blank causes a transient entry to be
           // created, so our first navigation to a real page is a replace
           // instead of a new entry.
           ++count;
           return true;
         },
 
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsISHistoryListener,
-                                               Ci.nsISupportsWeakReference])
+        QueryInterface: ChromeUtils.generateQI([Ci.nsISHistoryListener,
+                                                Ci.nsISupportsWeakReference])
       };
 
       history.legacySHistory.addSHistoryListener(listener);
       // Since listener implements nsISupportsWeakReference, we are
       // responsible for keeping it alive so that the GC doesn't clear
       // it before the test completes. We do this by anchoring the listener
       // to the content global window, and clearing it just before the test
       // completes.
--- a/docshell/test/browser/browser_onbeforeunload_navigation.js
+++ b/docshell/test/browser/browser_onbeforeunload_navigation.js
@@ -150,17 +150,17 @@ var tabStateListener = {
     if ((stateFlags & startDocumentFlags) == startDocumentFlags) {
       loadStarted = true;
     }
   },
   onStatusChange: () => {},
   onLocationChange: () => {},
   onSecurityChange: () => {},
   onProgressChange: () => {},
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener])
 };
 
 function onTabModalDialogLoaded(node) {
   let mm = testTab.linkedBrowser.messageManager;
   mm.sendAsyncMessage("test-beforeunload:dialog");
 
   if (gMultiProcessBrowser) {
     // In non-e10s, onTabModalDialogLoaded fires synchronously while
--- a/docshell/test/browser/file_bug1328501_framescript.js
+++ b/docshell/test/browser/file_bug1328501_framescript.js
@@ -9,17 +9,17 @@ let requestObserver = {
       // content viewers being created.
       getChildDocShells().map(ds => {
         let window = ds.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsILoadContext)
                       .associatedWindow;
       });
     }
   },
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIObserver
   ])
 }
 Services.obs.addObserver(requestObserver, "http-on-opening-request");
 addEventListener("unload", e => {
   if (e.target == this) {
     Services.obs.removeObserver(requestObserver, "http-on-opening-request");
   }
--- a/docshell/test/browser/file_bug422543_script.js
+++ b/docshell/test/browser/file_bug422543_script.js
@@ -33,18 +33,18 @@ SHistoryListener.prototype = {
 
   OnHistoryReload: function (aReloadURI, aReloadFlags) {
     this.last = "reload";
     return this.retval;
   },
 
   OnHistoryReplaceEntry: function (aIndex) {},
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISHistoryListener,
-                                         Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsISHistoryListener,
+                                          Ci.nsISupportsWeakReference])
 };
 
 let testAPI = {
   shistory: null,
   listeners: [ new SHistoryListener(),
                new SHistoryListener() ],
 
   init() {
--- a/docshell/test/chrome/test_bug909218.html
+++ b/docshell/test/chrome/test_bug909218.html
@@ -104,17 +104,17 @@ RequestWatcher = {
     is(req.loadFlags & TEST_FLAGS, TEST_FLAGS, "request " + req.name + " has the expected flags");
     this.requestCounts[req.name] += 1;
     var stopFlags = Ci.nsIWebProgressListener.STATE_STOP |
                     Ci.nsIWebProgressListener.STATE_IS_DOCUMENT;
     if (req.name == TEST_URL && (flags & stopFlags) == stopFlags) {
       this.finalize();
     }
   },
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIWebProgressListener,
     Ci.nsISupportsWeakReference,
   ])
 }
 
 function docshellForWindow(win) {
   return win.
          QueryInterface(Ci.nsIInterfaceRequestor).
--- a/docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul
+++ b/docshell/test/chrome/test_viewsource_forbidden_in_iframe.xul
@@ -54,18 +54,18 @@ https://bugzilla.mozilla.org/show_bug.cg
             reject("no network error message found in URI")
             return;
           }
 
           var errorMsg = matchArray[1];
           resolve(decodeURIComponent(errorMsg));
         },
 
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                               Ci.nsISupportsWeakReference])
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                                Ci.nsISupportsWeakReference])
       };
 
       frame.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIWebNavigation)
                          .QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIWebProgress)
                          .addProgressListener(progressListener,
                                               Ci.nsIWebProgress.NOTIFY_LOCATION |
--- a/dom/base/DOMRequestHelper.jsm
+++ b/dom/base/DOMRequestHelper.jsm
@@ -37,18 +37,18 @@ function DOMRequestIpcHelper() {
   this._window = null;
 }
 
 DOMRequestIpcHelper.prototype = {
   /**
    * An object which "inherits" from DOMRequestIpcHelper and declares its own
    * queryInterface method MUST implement Ci.nsISupportsWeakReference.
    */
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
-                                         Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference,
+                                          Ci.nsIObserver]),
 
    /**
    *  'aMessages' is expected to be an array of either:
    *  - objects of this form:
    *    {
    *      name: "messageName",
    *      weakRef: false
    *    }
--- a/dom/base/ProcessSelector.js
+++ b/dom/base/ProcessSelector.js
@@ -7,17 +7,17 @@ ChromeUtils.import('resource://gre/modul
 
 // Fills up aProcesses until max and then selects randomly from the available
 // ones.
 function RandomSelector() {
 }
 
 RandomSelector.prototype = {
   classID:          Components.ID("{c616fcfd-9737-41f1-aa74-cee72a38f91b}"),
-  QueryInterface:   XPCOMUtils.generateQI([Ci.nsIContentProcessProvider]),
+  QueryInterface:   ChromeUtils.generateQI([Ci.nsIContentProcessProvider]),
 
   provideProcess(aType, aOpener, aProcesses, aCount, aMaxCount) {
     if (aCount < aMaxCount) {
       return Ci.nsIContentProcessProvider.NEW_PROCESS;
     }
 
     let startIdx = Math.floor(Math.random() * aMaxCount);
     let curIdx = startIdx;
@@ -36,17 +36,17 @@ RandomSelector.prototype = {
 
 // Fills up aProcesses until max and then selects one from the available
 // ones that host the least number of tabs.
 function MinTabSelector() {
 }
 
 MinTabSelector.prototype = {
   classID:          Components.ID("{2dc08eaf-6eef-4394-b1df-a3a927c1290b}"),
-  QueryInterface:   XPCOMUtils.generateQI([Ci.nsIContentProcessProvider]),
+  QueryInterface:   ChromeUtils.generateQI([Ci.nsIContentProcessProvider]),
 
   provideProcess(aType, aOpener, aProcesses, aCount, aMaxCount) {
     if (aCount < aMaxCount) {
       return Ci.nsIContentProcessProvider.NEW_PROCESS;
     }
 
     let min = Number.MAX_VALUE;
     let candidate = Ci.nsIContentProcessProvider.NEW_PROCESS;
--- a/dom/base/SlowScriptDebug.js
+++ b/dom/base/SlowScriptDebug.js
@@ -7,17 +7,17 @@
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function SlowScriptDebug() { }
 
 SlowScriptDebug.prototype = {
   classID: Components.ID("{e740ddb4-18b4-4aac-8ae1-9b0f4320769d}"),
   classDescription: "Slow script debug handler",
   contractID: "@mozilla.org/dom/slow-script-debug;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISlowScriptDebug]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsISlowScriptDebug]),
 
   get activationHandler()   { return this._activationHandler; },
   set activationHandler(cb) { return this._activationHandler = cb; },
 
   get remoteActivationHandler()   { return this._remoteActivationHandler; },
   set remoteActivationHandler(cb) { return this._remoteActivationHandler = cb; },
 };
 
--- a/dom/base/contentAreaDropListener.js
+++ b/dom/base/contentAreaDropListener.js
@@ -13,17 +13,17 @@ ChromeUtils.import("resource://gre/modul
 // access the uri. This prevents, for example, a source document from tricking
 // the user into dragging a chrome url.
 
 function ContentAreaDropListener() { };
 
 ContentAreaDropListener.prototype =
 {
   classID:          Components.ID("{1f34bc80-1bc7-11d6-a384-d705dd0746fc}"),
-  QueryInterface:   XPCOMUtils.generateQI([Ci.nsIDroppedLinkHandler, Ci.nsISupports]),
+  QueryInterface:   ChromeUtils.generateQI([Ci.nsIDroppedLinkHandler]),
 
   _addLink : function(links, url, name, type)
    {
     links.push({ url, name, type });
   },
 
   _addLinksFromItem: function(links, dt, i)
   {
--- a/dom/base/test/browser_bug1303838.js
+++ b/dom/base/test/browser_bug1303838.js
@@ -161,14 +161,14 @@ function waitForLocationChange(browser, 
     locationChangeListener = {
       onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
         info("LocationChange: " + aLocation.spec);
         if (++seen == locationChangeNum) {
           browser.removeProgressListener(this);
           resolve();
         }
       },
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                             Ci.nsISupportsWeakReference])
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                              Ci.nsISupportsWeakReference])
     };
     browser.addProgressListener(locationChangeListener);
   });
 }
--- a/dom/base/test/browser_promiseDocumentFlushed.js
+++ b/dom/base/test/browser_promiseDocumentFlushed.js
@@ -116,18 +116,18 @@ add_task(async function test_can_get_res
   assertFlushesRequired();
 
   let rect = await window.promiseDocumentFlushed(() => {
     let observer = {
       reflow() {
         Assert.ok(false, "A reflow should not have occurred.");
       },
       reflowInterruptible() {},
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
-                                             Ci.nsISupportsWeakReference])
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIReflowObserver,
+                                              Ci.nsISupportsWeakReference])
     };
 
     let docShell = window.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIWebNavigation)
                          .QueryInterface(Ci.nsIDocShell);
     docShell.addWeakReflowObserver(observer);
 
     let toolboxRect = gNavToolbox.getBoundingClientRect();
--- a/dom/base/test/chrome/file_bug549682.xul
+++ b/dom/base/test/chrome/file_bug549682.xul
@@ -87,33 +87,33 @@ https://bugzilla.mozilla.org/show_bug.cg
   function localL(m) {
     is(m.name, "lasync", "Wrong message!");
     is(m.json.data, 2345, "Wrong data!");
     didRunLocal = true;
   }
 
   var weakMessageReceived = false;
   var weakListener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference]),
 
     receiveMessage: function(msg) {
       if (weakMessageReceived) {
         ok(false, 'Weak listener fired twice.');
         return;
       }
 
       ok(true, 'Weak listener fired once.');
       weakMessageReceived = true;
       document.getElementById('ifr').messageManager
               .removeWeakMessageListener('weak', weakListener);
     }
   };
 
   var weakListener2 = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference]),
 
     receiveMessage: function(msg) {
       ok(false, 'Should not have received a message.');
     }
   };
 
   function weakDoneListener() {
     ok(weakMessageReceived, 'Got "weak" message.');
--- a/dom/base/test/chrome/test_bug682305.html
+++ b/dom/base/test/chrome/test_bug682305.html
@@ -88,17 +88,17 @@ CustomChannel.prototype = {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
   suspend: function() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
   resume: function() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
 };
 
 
 function CustomProtocol() {}
 CustomProtocol.prototype = {
   get scheme() {
     return PROTOCOL_SCHEME;
   },
@@ -120,19 +120,17 @@ CustomProtocol.prototype = {
              .finalize();
   },
   newChannel2: function newChannel2(URI, loadInfo) {
     return new CustomChannel(URI, loadInfo);
   },
   newChannel: function newChannel(URI) {
     return newChannel2(URI);
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsIProtocolHandler])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIProtocolHandler])
 };
 
 var gFactory = {
   register: function() {
     var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
     var classID = Components.ID("{ed064287-1e76-49ba-a28d-dc74394a8334}");
     var description = PROTOCOL_SCHEME + ": protocol";
--- a/dom/base/test/chrome/test_bug800386.xul
+++ b/dom/base/test/chrome/test_bug800386.xul
@@ -41,18 +41,17 @@ https://bugzilla.mozilla.org/show_bug.cg
           return xhr2.getInterface(aIID);
         } catch (e) {
           forwardFailed = true;
         }
       }
       throw Cr.NS_ERROR_NO_INTERFACE;
     },
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                           Ci.nsIInterfaceRequestor])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIInterfaceRequestor])
   };
 
   // HTTP URI so that we get progress callbacks
   xhr.open("GET", "http://mochi.test:8888/", false);
   xhr.channel.notificationCallbacks = requestor;
   xhr.onreadystatechange = function() {
     if (xhr.readyState == 4) {
       ok(triedForwarding,
--- a/dom/bindings/test/TestInterfaceJS.js
+++ b/dom/bindings/test/TestInterfaceJS.js
@@ -8,19 +8,17 @@
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function TestInterfaceJS(anyArg, objectArg) {}
 
 TestInterfaceJS.prototype = {
   classID: Components.ID("{2ac4e026-cf25-47d5-b067-78d553c3cad8}"),
   contractID: "@mozilla.org/dom/test-interface-js;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer,
-                                         Ci.mozITestInterfaceJS]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer, Ci.mozITestInterfaceJS]),
 
   init: function(win) { this._win = win; },
 
   __init: function (anyArg, objectArg, dictionaryArg) {
     this._anyAttr = undefined;
     this._objectAttr = null;
     this._anyArg = anyArg;
     this._objectArg = objectArg;
--- a/dom/bindings/test/TestInterfaceJSMaplike.js
+++ b/dom/bindings/test/TestInterfaceJSMaplike.js
@@ -8,18 +8,17 @@
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function TestInterfaceJSMaplike() {}
 
 TestInterfaceJSMaplike.prototype = {
   classID: Components.ID("{4bc6f6f3-e005-4f0a-b42d-4d1663a9013a}"),
   contractID: "@mozilla.org/dom/test-interface-js-maplike;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
 
   init: function(win) { this._win = win; },
 
   __init: function () {},
 
   setInternal: function(aKey, aValue) {
     return this.__DOM_IMPL__.__set(aKey, aValue);
   },
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -118,18 +118,18 @@ function BrowserElementChild() {
 
   this._isContentWindowCreated = false;
 
   this._init();
 };
 
 BrowserElementChild.prototype = {
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
   _init: function() {
     debug("Starting up.");
 
     BrowserElementPromptService.mapWindowToBrowserElementChild(content, this);
 
     docShell.QueryInterface(Ci.nsIWebProgress)
             .addProgressListener(this._progressListener,
@@ -1375,18 +1375,18 @@ BrowserElementChild.prototype = {
     }
     this._finder.removeSelection();
     sendAsyncMsg("findchange", {active: false});
   },
 
   // The docShell keeps a weak reference to the progress listener, so we need
   // to keep a strong ref to it ourselves.
   _progressListener: {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                            Ci.nsISupportsWeakReference]),
     _seenLoadStart: false,
 
     onLocationChange: function(webProgress, request, location, flags) {
       // We get progress events from subshells here, which is kind of weird.
       if (webProgress != docShell) {
         return;
       }
 
--- a/dom/browser-element/BrowserElementParent.js
+++ b/dom/browser-element/BrowserElementParent.js
@@ -69,19 +69,19 @@ function BrowserElementParent() {
   Services.obs.addObserver(this, 'back-docommand', /* ownsWeak = */ true);
 }
 
 BrowserElementParent.prototype = {
 
   classDescription: "BrowserElementAPI implementation",
   classID: Components.ID("{9f171ac4-0939-4ef8-b360-3408aedc3060}"),
   contractID: "@mozilla.org/dom/browser-element-api;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserElementAPI,
-                                         Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserElementAPI,
+                                          Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
   setFrameLoader: function(frameLoader) {
     debug("Setting frameLoader");
     this._frameLoader = frameLoader;
     this._frameElement = frameLoader.ownerElement;
     if (!this._frameElement) {
       debug("No frame element?");
       return;
@@ -723,18 +723,18 @@ BrowserElementParent.prototype = {
           this.extListener.onStopRequest(aRequest, aContext, aStatusCode);
         }
       },
       onDataAvailable: function(aRequest, aContext, aInputStream,
                                 aOffset, aCount) {
         this.extListener.onDataAvailable(aRequest, aContext, aInputStream,
                                          aOffset, aCount);
       },
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener,
-                                             Ci.nsIRequestObserver])
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener,
+                                              Ci.nsIRequestObserver])
     };
 
     let referrer = Services.io.newURI(_options.referrer);
     let principal =
       Services.scriptSecurityManager.createCodebasePrincipal(
         referrer, this._frameLoader.loadContext.originAttributes);
 
     let channel = NetUtil.newChannel({
--- a/dom/browser-element/BrowserElementPromptService.jsm
+++ b/dom/browser-element/BrowserElementPromptService.jsm
@@ -20,17 +20,17 @@ function debug(msg) {
 }
 
 function BrowserElementPrompt(win, browserElementChild) {
   this._win = win;
   this._browserElementChild = browserElementChild;
 }
 
 BrowserElementPrompt.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt]),
 
   alert: function(title, text) {
     this._browserElementChild.showModalPrompt(
       this._win, {promptType: "alert", title: title, message: text, returnValue: undefined});
   },
 
   alertCheck: function(title, text, checkMsg, checkState) {
     // Treat this like a normal alert() call, ignoring the checkState.  The
@@ -207,17 +207,17 @@ BrowserElementPrompt.prototype = {
   },
 };
 
 
 function BrowserElementAuthPrompt() {
 }
 
 BrowserElementAuthPrompt.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAuthPrompt2]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAuthPrompt2]),
 
   promptAuth: function promptAuth(channel, level, authInfo) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   asyncPromptAuth: function asyncPromptAuth(channel, callback, context, level, authInfo) {
     debug("asyncPromptAuth");
 
@@ -237,17 +237,17 @@ BrowserElementAuthPrompt.prototype = {
       BrowserElementPromptService.getBrowserElementParentForFrame(frame);
 
     if (!browserElementParent) {
       debug("Failed to load browser element parent.");
       throw Cr.NS_ERROR_FAILURE;
     }
 
     let consumer = {
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+      QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
       callback: callback,
       context: context,
       cancel: function() {
         this.callback.onAuthCancelled(this.context, false);
         this.callback = null;
         this.context = null;
       }
     };
@@ -436,17 +436,17 @@ BrowserElementAuthPrompt.prototype = {
 
 
 function AuthPromptWrapper(oldImpl, browserElementImpl) {
   this._oldImpl = oldImpl;
   this._browserElementImpl = browserElementImpl;
 }
 
 AuthPromptWrapper.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAuthPrompt2]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAuthPrompt2]),
   promptAuth: function(channel, level, authInfo) {
     if (this._canGetParentElement(channel)) {
       return this._browserElementImpl.promptAuth(channel, level, authInfo);
     } else {
       return this._oldImpl.promptAuth(channel, level, authInfo);
     }
   },
 
@@ -478,17 +478,17 @@ AuthPromptWrapper.prototype = {
 };
 
 function BrowserElementPromptFactory(toWrap) {
   this._wrapped = toWrap;
 }
 
 BrowserElementPromptFactory.prototype = {
   classID: Components.ID("{24f3d0cf-e417-4b85-9017-c9ecf8bb1299}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptFactory]),
 
   _mayUseNativePrompt: function() {
     try {
       return Services.prefs.getBoolPref("browser.prompt.allowNative");
     } catch (e) {
       // This properity is default to true.
       return true;
     }
@@ -558,18 +558,18 @@ BrowserElementPromptFactory.prototype = 
 
     debug("Returning wrapped getPrompt for " + win);
     return new BrowserElementPrompt(win, browserElementChild)
                                    .QueryInterface(iid);
   }
 };
 
 var BrowserElementPromptService = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
 
   _initialized: false,
 
   _init: function() {
     if (this._initialized) {
       return;
     }
 
--- a/dom/console/ConsoleAPIStorage.js
+++ b/dom/console/ConsoleAPIStorage.js
@@ -39,18 +39,18 @@ const CONSOLEAPISTORAGE_CID = Components
  *    ConsoleAPIStorage.clearEvents(innerWindowID);
  */
 function ConsoleAPIStorageService() {
   this.init();
 }
 
 ConsoleAPIStorageService.prototype = {
   classID : CONSOLEAPISTORAGE_CID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIConsoleAPIStorage,
-                                         Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIConsoleAPIStorage,
+                                          Ci.nsIObserver]),
   classInfo: XPCOMUtils.generateCI({
     classID: CONSOLEAPISTORAGE_CID,
     contractID: '@mozilla.org/consoleAPI-storage;1',
     interfaces: [Ci.nsIConsoleAPIStorage, Ci.nsIObserver],
     flags: Ci.nsIClassInfo.SINGLETON
   }),
 
   observe: function CS_observe(aSubject, aTopic, aData)
--- a/dom/html/htmlMenuBuilder.js
+++ b/dom/html/htmlMenuBuilder.js
@@ -25,17 +25,17 @@ function HTMLMenuBuilder() {
 // other UI from this object. The default UI is done in PageMenu.jsm.
 //
 // When a multi-process browser is used, the first step is performed by the child
 // process and the second step is performed by the parent process.
 
 HTMLMenuBuilder.prototype =
 {
   classID:        Components.ID("{51c65f5d-0de5-4edc-9058-60e50cef77f8}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMenuBuilder]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMenuBuilder]),
 
   currentNode: null,
   root: null,
   items: {},
   nestedStack: [],
 
   toJSONString: function() {
     return JSON.stringify(this.root);
--- a/dom/html/test/head.js
+++ b/dom/html/test/head.js
@@ -33,18 +33,18 @@ function waitForDocLoadComplete(aBrowser
         if ((flags & docStop) == docStop && status != Cr.NS_BINDING_ABORTED) {
           aBrowser.removeProgressListener(this);
           waitForDocLoadComplete.listeners.delete(this);
           let chan = req.QueryInterface(Ci.nsIChannel);
           info("Browser loaded " + chan.originalURI.spec);
           resolve();
         }
       },
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                             Ci.nsISupportsWeakReference])
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                              Ci.nsISupportsWeakReference])
     };
     aBrowser.addProgressListener(listener);
     waitForDocLoadComplete.listeners.add(listener);
     info("Waiting for browser load");
   });
 }
 // Keep a set of progress listeners for waitForDocLoadComplete() to make sure
 // they're not GC'ed before we saw the page load.
--- a/dom/indexedDB/test/unit/GlobalObjectsComponent.js
+++ b/dom/indexedDB/test/unit/GlobalObjectsComponent.js
@@ -9,17 +9,17 @@ Cu.importGlobalProperties(["indexedDB"])
 function GlobalObjectsComponent() {
   this.wrappedJSObject = this;
 }
 
 GlobalObjectsComponent.prototype =
 {
   classID: Components.ID("{949ebf50-e0da-44b9-8335-cbfd4febfdcc}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]),
+  QueryInterface: ChromeUtils.generateQI([]),
 
   runTest() {
     const name = "Splendid Test";
 
     let ok = this.ok;
     let finishTest = this.finishTest;
 
     let keyRange = IDBKeyRange.only(42);
--- a/dom/media/IdpSandbox.jsm
+++ b/dom/media/IdpSandbox.jsm
@@ -18,17 +18,17 @@ RedirectHttpsOnly.prototype = {
     } else {
       callback.onRedirectVerifyCallback(Cr.NS_OK);
     }
   },
 
   getInterface(iid) {
     return this.QueryInterface(iid);
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannelEventSink])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIChannelEventSink])
 };
 
 /** This class loads a resource into a single string. ResourceLoader.load() is
  * the entry point. */
 function ResourceLoader(res, rej) {
   this.resolve = res;
   this.reject = rej;
   this.data = "";
@@ -72,17 +72,17 @@ ResourceLoader.prototype = {
     } else {
       this.reject(new Error("Load failed: " + status));
     }
   },
 
   getInterface(iid) {
     return this.QueryInterface(iid);
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener])
 };
 
 /**
  * A simple implementation of the WorkerLocation interface.
  */
 function createLocationFromURI(uri) {
   return {
     href: uri.spec,
--- a/dom/media/PeerConnection.js
+++ b/dom/media/PeerConnection.js
@@ -198,18 +198,18 @@ class GlobalPCList {
     }
   }
 
   _registerPeerConnectionLifecycleCallback(winID, cb) {
     this._lifecycleobservers[winID] = cb;
   }
 }
 setupPrototype(GlobalPCList, {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsISupportsWeakReference]),
   classID: PC_MANAGER_CID,
   _xpcom_factory: {
     createInstance(outer, iid) {
       if (outer) {
         throw Cr.NS_ERROR_NO_AGGREGATION;
       }
       return _globalPCList.QueryInterface(iid);
     }
@@ -225,18 +225,17 @@ class RTCIceCandidate {
 
   __init(dict) {
     Object.assign(this, dict);
   }
 }
 setupPrototype(RTCIceCandidate, {
   classID: PC_ICE_CID,
   contractID: PC_ICE_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer])
 });
 
 class RTCSessionDescription {
   init(win) {
     this._win = win;
     this._winID = this._win.QueryInterface(Ci.nsIInterfaceRequestor)
     .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
   }
@@ -270,18 +269,17 @@ class RTCSessionDescription {
     let err = this._win.Error();
     logMsg(msg, err.fileName, err.lineNumber, Ci.nsIScriptError.warningFlag,
            this._winID);
   }
 }
 setupPrototype(RTCSessionDescription, {
   classID: PC_SESSION_CID,
   contractID: PC_SESSION_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer])
 });
 
 class RTCStatsReport {
   constructor(win, dict) {
     this._win = win;
     this._pcid = dict.pcid;
     this._report = convertToRTCStatsReport(dict);
   }
@@ -325,17 +323,17 @@ class RTCStatsReport {
 
   __onget(key, value) {
     /* Do whatever here */
   }
 }
 setupPrototype(RTCStatsReport, {
   classID: PC_STATS_CID,
   contractID: PC_STATS_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]),
+  QueryInterface: ChromeUtils.generateQI([]),
   _specToLegacyFieldMapping: {
         "inbound-rtp": "inboundrtp",
         "outbound-rtp": "outboundrtp",
         "candidate-pair": "candidatepair",
         "local-candidate": "localcandidate",
         "remote-candidate": "remotecandidate"
   }
 });
@@ -1601,18 +1599,17 @@ class RTCPeerConnection {
     this.updateNegotiationNeeded();
 
     return dataChannel;
   }
 }
 setupPrototype(RTCPeerConnection, {
   classID: PC_CID,
   contractID: PC_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
   _actions: {
     offer: Ci.IPeerConnection.kActionOffer,
     answer: Ci.IPeerConnection.kActionAnswer,
     pranswer: Ci.IPeerConnection.kActionPRAnswer,
     rollback: Ci.IPeerConnection.kActionRollback,
   },
 });
 
@@ -1860,35 +1857,33 @@ class PeerConnectionObserver {
 
   syncTransceivers() {
     this._dompc._syncTransceivers();
   }
 }
 setupPrototype(PeerConnectionObserver, {
   classID: PC_OBS_CID,
   contractID: PC_OBS_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer])
 });
 
 class RTCPeerConnectionStatic {
   init(win) {
     this._winID = win.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
   }
 
   registerPeerConnectionLifecycleCallback(cb) {
     _globalPCList._registerPeerConnectionLifecycleCallback(this._winID, cb);
   }
 }
 setupPrototype(RTCPeerConnectionStatic, {
   classID: PC_STATIC_CID,
   contractID: PC_STATIC_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
-                                         Ci.nsIDOMGlobalPropertyInitializer])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer])
 });
 
 class RTCDTMFSender {
   constructor(sender) {
     this._sender = sender;
   }
 
   get toneBuffer() {
@@ -1906,17 +1901,17 @@ class RTCDTMFSender {
   insertDTMF(tones, duration, interToneGap) {
     this._sender._pc._checkClosed();
     this._sender._transceiver.insertDTMF(tones, duration, interToneGap);
   }
 }
 setupPrototype(RTCDTMFSender, {
   classID: PC_DTMF_SENDER_CID,
   contractID: PC_DTMF_SENDER_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports])
+  QueryInterface: ChromeUtils.generateQI([])
 });
 
 class RTCRtpSender {
   constructor(pc, transceiverImpl, transceiver, track, kind, streams) {
     let dtmf = null;
     if (kind == "audio") {
       dtmf = pc._win.RTCDTMFSender._create(pc._win, new RTCDTMFSender(this));
     }
@@ -2048,17 +2043,17 @@ class RTCRtpSender {
           "This sender was not created by this PeerConnection",
           "InvalidAccessError");
     }
   }
 }
 setupPrototype(RTCRtpSender, {
   classID: PC_SENDER_CID,
   contractID: PC_SENDER_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports])
+  QueryInterface: ChromeUtils.generateQI([])
 });
 
 class RTCRtpReceiver {
   constructor(pc, transceiverImpl) {
     // We do not set the track here; that is done when _transceiverImpl is set
     Object.assign(this,
         {
           _pc: pc,
@@ -2218,17 +2213,17 @@ class RTCRtpReceiver {
           { track: this.track });
       trackEvents.push(ev);
     }
   }
 }
 setupPrototype(RTCRtpReceiver, {
   classID: PC_RECEIVER_CID,
   contractID: PC_RECEIVER_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports])
+  QueryInterface: ChromeUtils.generateQI([])
 });
 
 class RTCRtpTransceiver {
   constructor(pc, transceiverImpl, init, kind, sendTrack) {
     let receiver = pc._win.RTCRtpReceiver._create(
         pc._win, new RTCRtpReceiver(pc, transceiverImpl, kind));
     let streams = (init && init.streams) || [];
     let sender = pc._win.RTCRtpSender._create(
@@ -2381,28 +2376,28 @@ class RTCRtpTransceiver {
     // extra hops through RTCPeerConnection and PeerConnectionImpl
     this._pc._insertDTMF(this._transceiverImpl, tones, duration, interToneGap);
   }
 }
 
 setupPrototype(RTCRtpTransceiver, {
   classID: PC_TRANSCEIVER_CID,
   contractID: PC_TRANSCEIVER_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports])
+  QueryInterface: ChromeUtils.generateQI([])
 });
 
 class CreateOfferRequest {
   constructor(windowID, innerWindowID, callID, isSecure) {
     Object.assign(this, { windowID, innerWindowID, callID, isSecure });
   }
 }
 setupPrototype(CreateOfferRequest, {
   classID: PC_COREQUEST_CID,
   contractID: PC_COREQUEST_CONTRACT,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports])
+  QueryInterface: ChromeUtils.generateQI([])
 });
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(
   [GlobalPCList,
    RTCDTMFSender,
    RTCIceCandidate,
    RTCSessionDescription,
    RTCPeerConnection,
--- a/dom/media/webvtt/WebVTTParserWrapper.js
+++ b/dom/media/webvtt/WebVTTParserWrapper.js
@@ -54,17 +54,17 @@ WebVTTParserWrapper.prototype =
 
   processCues: function(window, cues, overlay, controls)
   {
     WebVTT.processCues(window, cues, overlay, controls);
   },
 
   classDescription: "Wrapper for the JS WebVTT implementation (vtt.js)",
   classID: Components.ID(WEBVTTPARSERWRAPPER_CID),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebVTTParserWrapper]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebVTTParserWrapper]),
   classInfo: XPCOMUtils.generateCI({
     classID:    WEBVTTPARSERWRAPPER_CID,
     contractID: WEBVTTPARSERWRAPPER_CONTRACTID,
     interfaces: [Ci.nsIWebVTTParserWrapper]
   })
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([WebVTTParserWrapper]);
--- a/dom/notification/NotificationStorage.js
+++ b/dom/notification/NotificationStorage.js
@@ -251,13 +251,13 @@ NotificationStorage.prototype = {
         this._byTag[origin][tag] = notification;
       }
     });
     this._cached = true;
   },
 
   classID : Components.ID(NOTIFICATIONSTORAGE_CID),
   contractID : NOTIFICATIONSTORAGE_CONTRACTID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsINotificationStorage]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsINotificationStorage]),
 };
 
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([NotificationStorage]);
--- a/dom/payments/test/BasiccardChromeScript.js
+++ b/dom/payments/test/BasiccardChromeScript.js
@@ -69,17 +69,17 @@ const detailedResponseUI = {
                       "",                   // payer email
                       "");                  // payer phone
     paymentSrv.respondPayment(showResponse.QueryInterface(Ci.nsIPaymentActionResponse));
   },
   abortPayment: abortPaymentResponse,
   completePayment: completePaymentResponse,
   updatePayment: function(requestId) {
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 };
 
 const simpleResponseUI = {
   showPayment: function(requestId) {
     try {
       basiccardResponseData.initData("",                 // cardholderName
                                      "4916855166538720", // cardNumber
                                      "",                 // expiryMonth
@@ -97,17 +97,17 @@ const simpleResponseUI = {
                       "",                   // payer email
                       "");                  // payer phone
     paymentSrv.respondPayment(showResponse.QueryInterface(Ci.nsIPaymentActionResponse));
   },
   abortPayment: abortPaymentResponse,
   completePayment: completePaymentResponse,
   updatePayment: function(requestId) {
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 };
 
 addMessageListener("set-detailed-ui-service", function() {
   paymentSrv.setTestingUIService(detailedResponseUI.QueryInterface(Ci.nsIPaymentUIService));
 });
 
 addMessageListener("set-simple-ui-service", function() {
   paymentSrv.setTestingUIService(simpleResponseUI.QueryInterface(Ci.nsIPaymentUIService));
--- a/dom/payments/test/CurrencyAmountValidationChromeScript.js
+++ b/dom/payments/test/CurrencyAmountValidationChromeScript.js
@@ -16,17 +16,17 @@ const InvalidDetailsUIService = {
                            createInstance(Ci.nsIPaymentAbortActionResponse);
     abortResponse.init(requestId, Ci.nsIPaymentActionResponse.ABORT_SUCCEEDED);
     paymentSrv.respondPayment(abortResponse.QueryInterface(Ci.nsIPaymentActionResponse));
   },
   completePayment: function(requestId) {
   },
   updatePayment: function(requestId) {
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 
 };
 
 function emitTestFail(message) {
   sendAsyncMessage("test-fail", message);
 }
 
 function checkLowerCaseCurrency() {
--- a/dom/payments/test/PMIValidationChromeScript.js
+++ b/dom/payments/test/PMIValidationChromeScript.js
@@ -34,17 +34,17 @@ const UIService = {
                       Ci.nsIPaymentActionResponse.PAYMENT_ACCEPTED,
                       "https://example.com",   // payment method
                       showResponseData,           // payment method data
                       "Bill A. Pacheco",          // payer name
                       "",                         // payer email
                       "");                        // payer phone
     paymentSrv.respondPayment(showResponse.QueryInterface(Ci.nsIPaymentActionResponse));
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 };
 
 function emitTestFail(message) {
   sendAsyncMessage("test-fail", message);
 }
 
 addMessageListener("set-ui-service", function() {
   paymentSrv.setTestingUIService(UIService.QueryInterface(Ci.nsIPaymentUIService));
--- a/dom/payments/test/RequestShippingChromeScript.js
+++ b/dom/payments/test/RequestShippingChromeScript.js
@@ -66,17 +66,17 @@ const NormalUIService = {
                       Ci.nsIPaymentActionResponse.PAYMENT_ACCEPTED,
                       "testing-payment-method",   // payment method
                       showResponseData,           // payment method data
                       "",                         // payer name
                       "",                         // payer email
                       "");                        // payer phone
     paymentSrv.respondPayment(showResponse.QueryInterface(Ci.nsIPaymentActionResponse));
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 };
 
 addMessageListener("set-normal-ui-service", function() {
   paymentSrv.setTestingUIService(NormalUIService.QueryInterface(Ci.nsIPaymentUIService));
 });
 
 addMessageListener("teardown", function() {
   paymentSrv.cleanup();
--- a/dom/payments/test/ShippingOptionsChromeScript.js
+++ b/dom/payments/test/ShippingOptionsChromeScript.js
@@ -69,17 +69,17 @@ const TestingUIService = {
   completePayment: function(requestId) {
     let request = paymentSrv.getPaymentRequestById(requestId);
     let completeResponse = Cc["@mozilla.org/dom/payments/payment-complete-action-response;1"].
                            createInstance(Ci.nsIPaymentCompleteActionResponse);
     completeResponse.init(requestId, Ci.nsIPaymentActionResponse.COMPLETE_SUCCEEDED);
     paymentSrv.respondPayment(completeResponse.QueryInterface(Ci.nsIPaymentActionResponse));
   },
   updatePayment: updateRequest,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 };
 
 paymentSrv.setTestingUIService(TestingUIService.QueryInterface(Ci.nsIPaymentUIService));
 
 addMessageListener("set-expected-results", function(results) {
   expectedRequestOption = results.requestResult;
   expectedUpdatedOption = results.responseResult;
   changeShippingOption = results.changeOptionResult;
--- a/dom/payments/test/ShowPaymentChromeScript.js
+++ b/dom/payments/test/ShowPaymentChromeScript.js
@@ -145,17 +145,17 @@ function updateRequest(requestId) {
   }
 }
 
 const DummyUIService = {
   showPayment: showRequest,
   abortPayment: abortRequest,
   completePayment: completeRequest,
   updatePayment: updateRequest,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPaymentUIService]),
 };
 
 paymentSrv.setTestingUIService(DummyUIService.QueryInterface(Ci.nsIPaymentUIService));
 
 function testShowResponseInit() {
   const showResponseData = Cc["@mozilla.org/dom/payments/general-response-data;1"].
                               createInstance(Ci.nsIGeneralResponseData);
   try {
--- a/dom/presentation/PresentationDataChannelSessionTransport.js
+++ b/dom/presentation/PresentationDataChannelSessionTransport.js
@@ -18,17 +18,17 @@ const PRESENTATIONTRANSPORT_CONTRACTID =
 const PRESENTATIONTRANSPORTBUILDER_CID = Components.ID("{215b2f62-46e2-4004-a3d1-6858e56c20f3}");
 const PRESENTATIONTRANSPORTBUILDER_CONTRACTID = "mozilla.org/presentation/datachanneltransportbuilder;1";
 
 function PresentationDataChannelDescription(aDataChannelSDP) {
   this._dataChannelSDP = JSON.stringify(aDataChannelSDP);
 }
 
 PresentationDataChannelDescription.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationChannelDescription]),
   get type() {
     return Ci.nsIPresentationChannelDescription.TYPE_DATACHANNEL;
   },
   get tcpAddress() {
     return null;
   },
   get tcpPort() {
     return null;
@@ -41,19 +41,19 @@ PresentationDataChannelDescription.proto
 function PresentationTransportBuilder() {
   log("PresentationTransportBuilder construct");
   this._isControlChannelNeeded = true;
 }
 
 PresentationTransportBuilder.prototype = {
   classID: PRESENTATIONTRANSPORTBUILDER_CID,
   contractID: PRESENTATIONTRANSPORTBUILDER_CONTRACTID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportBuilder,
-                                         Ci.nsIPresentationDataChannelSessionTransportBuilder,
-                                         Ci.nsITimerCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportBuilder,
+                                          Ci.nsIPresentationDataChannelSessionTransportBuilder,
+                                          Ci.nsITimerCallback]),
 
   buildDataChannelTransport: function(aRole, aWindow, aListener) {
     if (!aRole || !aWindow || !aListener) {
       log("buildDataChannelTransport with illegal parameters");
       throw Cr.NS_ERROR_ILLEGAL_VALUE;
     }
 
     if (this._window) {
@@ -240,17 +240,17 @@ PresentationTransportBuilder.prototype =
 function PresentationTransport() {
   this._messageQueue = [];
   this._closeReason = Cr.NS_OK;
 }
 
 PresentationTransport.prototype = {
   classID: PRESENTATIONTRANSPORT_CID,
   contractID: PRESENTATIONTRANSPORT_CONTRACTID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransport]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransport]),
 
   init: function(aPeerConnection, aDataChannel, aWindow) {
     log("initWithDataChannel");
     this._enableDataNotification = false;
     this._dataChannel = aDataChannel;
     this._peerConnection = aPeerConnection;
     this._window = aWindow;
 
--- a/dom/presentation/PresentationNetworkHelper.js
+++ b/dom/presentation/PresentationNetworkHelper.js
@@ -9,17 +9,17 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const NETWORKHELPER_CID = Components.ID("{5fb96caa-6d49-4f6b-9a4b-65dd0d51f92d}");
 
 function PresentationNetworkHelper() {}
 
 PresentationNetworkHelper.prototype = {
   classID: NETWORKHELPER_CID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationNetworkHelper]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationNetworkHelper]),
 
   getWifiIPAddress: function(aListener) {
     EventDispatcher.instance.sendRequestForResult({type: "Wifi:GetIPAddress"})
              .then(result => aListener.onGetWifiIPAddress(result),
                    err => aListener.onError(err));
   }
 };
 
--- a/dom/presentation/provider/AndroidCastDeviceProvider.js
+++ b/dom/presentation/provider/AndroidCastDeviceProvider.js
@@ -255,17 +255,17 @@ LocalControlChannel.prototype = {
   },
 
   reconnect: function LCC_reconnect(aPresentationId, aUrl) {
     log("1-UA on Android doesn't support reconnect.");
     throw Cr.NS_ERROR_FAILURE;
   },
 
   classID: Components.ID("{c9be9450-e5c7-4294-a287-376971b017fd}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
 };
 
 function ChromecastRemoteDisplayDevice(aProvider, aId, aName, aRole) {
   this._provider = aProvider;
   this._id       = aId;
   this._name     = aName;
   this._role     = aRole;
 }
@@ -344,20 +344,20 @@ ChromecastRemoteDisplayDevice.prototype 
           + aTopic + " data=" + aData);
       if (this.windowId === aData) {
         Services.obs.removeObserver(this, TOPIC_PRESENTATION_VIEW_READY);
         this._ctrlChannel.notifyConnected();
       }
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice,
-                                         Ci.nsIPresentationLocalDevice,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice,
+                                          Ci.nsIPresentationLocalDevice,
+                                          Ci.nsISupportsWeakReference,
+                                          Ci.nsIObserver]),
 };
 
 function AndroidCastDeviceProvider() {
   this._listener = null;
   this._deviceList = new Map();
 }
 
 AndroidCastDeviceProvider.prototype = {
@@ -458,13 +458,13 @@ AndroidCastDeviceProvider.prototype = {
         this._listener.removeDevice(device);
         this._deviceList.delete(deviceId);
         break;
       }
     }
   },
 
   classID: Components.ID("{7394f24c-dbc3-48c8-8a47-cd10169b7c6b}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsIPresentationDeviceProvider]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsIPresentationDeviceProvider]),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AndroidCastDeviceProvider]);
--- a/dom/presentation/provider/PresentationControlService.js
+++ b/dom/presentation/provider/PresentationControlService.js
@@ -353,19 +353,19 @@ PresentationControlService.prototype = {
         this.startServer();
       } catch (e) {
         DEBUG && log("PresentationControlService - restart service fail: " + e); // jshint ignore:line
       }
     }
   },
 
   classID: Components.ID("{f4079b8b-ede5-4b90-a112-5b415a931deb}"),
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIServerSocketListener,
-                                          Ci.nsIPresentationControlService,
-                                          Ci.nsIObserver]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIServerSocketListener,
+                                           Ci.nsIPresentationControlService,
+                                           Ci.nsIObserver]),
 };
 
 function ChannelDescription(aInit) {
   this._type = aInit.type;
   switch (this._type) {
     case Ci.nsIPresentationChannelDescription.TYPE_TCP:
       this._tcpAddresses = Cc["@mozilla.org/array;1"]
                            .createInstance(Ci.nsIMutableArray);
@@ -402,17 +402,17 @@ ChannelDescription.prototype = {
     return this._tcpPort;
   },
 
   get dataChannelSDP() {
     return this._dataChannelSDP;
   },
 
   classID: Components.ID("{82507aea-78a2-487e-904a-858a6c5bf4e1}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationChannelDescription]),
 };
 
 // Helper function: transfer nsIPresentationChannelDescription to json
 function discriptionAsJson(aDescription) {
   let json = {};
   json.type = aDescription.type;
   switch(aDescription.type) {
     case Ci.nsIPresentationChannelDescription.TYPE_TCP:
@@ -947,13 +947,13 @@ TCPControlChannel.prototype = {
     this._onAnswer(answer);
   },
 
   notifyIceCandidate: function(candidate) {
     this._listener.onIceCandidate(candidate);
   },
 
   classID: Components.ID("{fefb8286-0bdc-488b-98bf-0c11b485c955}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel,
-                                         Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel,
+                                          Ci.nsIStreamListener]),
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PresentationControlService]); // jshint ignore:line
--- a/dom/presentation/tests/mochitest/PresentationDeviceInfoChromeScript.js
+++ b/dom/presentation/tests/mochitest/PresentationDeviceInfoChromeScript.js
@@ -4,82 +4,82 @@
 'use strict';
 
 const { XPCOMUtils } = ChromeUtils.import('resource://gre/modules/XPCOMUtils.jsm');
 
 const manager = Cc['@mozilla.org/presentation-device/manager;1']
                   .getService(Ci.nsIPresentationDeviceManager);
 
 var testProvider = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceProvider]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceProvider]),
   forceDiscovery: function() {
     sendAsyncMessage('force-discovery');
   },
   listener: null,
 };
 
 var testDevice = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   establishControlChannel: function() {
     return null;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
     return true;
   },
   id: null,
   name: null,
   type: null,
   listener: null,
 };
 
 var testDevice1 = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id: 'dummyid',
   name: 'dummyName',
   type: 'dummyType',
   establishControlChannel: function(url, presentationId) {
     return null;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
     return true;
   },
 };
 
 var testDevice2 = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id: 'dummyid',
   name: 'dummyName',
   type: 'dummyType',
   establishControlChannel: function(url, presentationId) {
     return null;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
     return true;
   },
 };
 
 var mockedDeviceWithoutSupportedURL = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id: 'dummyid',
   name: 'dummyName',
   type: 'dummyType',
   establishControlChannel: function(url, presentationId) {
     return null;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
     return false;
   },
 };
 
 var mockedDeviceSupportHttpsURL = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id: 'dummyid',
   name: 'dummyName',
   type: 'dummyType',
   establishControlChannel: function(url, presentationId) {
     return null;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
--- a/dom/presentation/tests/mochitest/PresentationSessionChromeScript.js
+++ b/dom/presentation/tests/mochitest/PresentationSessionChromeScript.js
@@ -49,30 +49,30 @@ var sessionId = 'test-session-id-' + uui
 
 const address = Cc["@mozilla.org/supports-cstring;1"]
                   .createInstance(Ci.nsISupportsCString);
 address.data = "127.0.0.1";
 const addresses = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
 addresses.appendElement(address);
 
 const mockedChannelDescription = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationChannelDescription]),
   get type() {
     if (Services.prefs.getBoolPref("dom.presentation.session_transport.data_channel.enable")) {
       return Ci.nsIPresentationChannelDescription.TYPE_DATACHANNEL;
     }
     return Ci.nsIPresentationChannelDescription.TYPE_TCP;
   },
   tcpAddress: addresses,
   tcpPort: 1234,
 };
 
 const mockedServerSocket = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIServerSocket,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIServerSocket,
+                                          Ci.nsIFactory]),
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   get port() {
     return this._port;
@@ -94,21 +94,21 @@ const mockedServerSocket = {
     this._listener.onStopListening(this, Cr.NS_BINDING_ABORTED);
   },
   simulateOnSocketAccepted: function(serverSocket, socketTransport) {
     this._listener.onSocketAccepted(serverSocket, socketTransport);
   }
 };
 
 const mockedSocketTransport = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsISocketTransport]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsISocketTransport]),
 };
 
 const mockedControlChannel = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
   set listener(listener) {
     this._listener = listener;
   },
   get listener() {
     return this._listener;
   },
   sendOffer: function(offer) {
     sendAsyncMessage('offer-sent', this._isValidSDP(offer));
@@ -172,33 +172,33 @@ const mockedControlChannel = {
   },
   simulateNotifyConnected: function() {
     sendAsyncMessage('control-channel-opened');
     this._listener.QueryInterface(Ci.nsIPresentationControlChannelListener).notifyConnected();
   },
 };
 
 const mockedDevice = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id: 'id',
   name: 'name',
   type: 'type',
   establishControlChannel: function(url, presentationId) {
     sendAsyncMessage('control-channel-established');
     return mockedControlChannel;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
     return true;
   },
 };
 
 const mockedDevicePrompt = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevicePrompt,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevicePrompt,
+                                          Ci.nsIFactory]),
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   set request(request) {
     this._request = request;
@@ -214,22 +214,22 @@ const mockedDevicePrompt = {
     this._request.select(mockedDevice);
   },
   simulateCancel: function(result) {
     this._request.cancel(result);
   }
 };
 
 const mockedSessionTransport = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransport,
-                                         Ci.nsIPresentationSessionTransportBuilder,
-                                         Ci.nsIPresentationTCPSessionTransportBuilder,
-                                         Ci.nsIPresentationDataChannelSessionTransportBuilder,
-                                         Ci.nsIPresentationControlChannelListener,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransport,
+                                          Ci.nsIPresentationSessionTransportBuilder,
+                                          Ci.nsIPresentationTCPSessionTransportBuilder,
+                                          Ci.nsIPresentationDataChannelSessionTransportBuilder,
+                                          Ci.nsIPresentationControlChannelListener,
+                                          Ci.nsIFactory]),
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   set callback(callback) {
     this._callback = callback;
@@ -252,17 +252,17 @@ const mockedSessionTransport = {
     }, 0);
   },
   buildTCPReceiverTransport: function(description, listener) {
     this._listener = listener;
     this._role = Ci.nsIPresentationService.ROLE_RECEIVER;
 
     var addresses = description.QueryInterface(Ci.nsIPresentationChannelDescription).tcpAddress;
     this._selfAddress = {
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsINetAddr]),
+      QueryInterface: ChromeUtils.generateQI([Ci.nsINetAddr]),
       address: (addresses.length > 0) ?
                 addresses.queryElementAt(0, Ci.nsISupportsCString).data : "",
       port: description.QueryInterface(Ci.nsIPresentationChannelDescription).tcpPort,
     };
 
     setTimeout(()=>{
       this._listener.onSessionTransport(this);
       this._listener = null;
@@ -303,43 +303,43 @@ const mockedSessionTransport = {
   },
   onOffer: function(aOffer) {
   },
   onAnswer: function(aAnswer) {
   }
 };
 
 const mockedNetworkInfo = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsINetworkInfo]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsINetworkInfo]),
   getAddresses: function(ips, prefixLengths) {
     ips.value = ["127.0.0.1"];
     prefixLengths.value = [0];
     return 1;
   },
 };
 
 const mockedNetworkManager = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsINetworkManager,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsINetworkManager,
+                                          Ci.nsIFactory]),
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   get activeNetworkInfo() {
     return mockedNetworkInfo;
   },
 };
 
 var requestPromise = null;
 
 const mockedRequestUIGlue = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationRequestUIGlue,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationRequestUIGlue,
+                                          Ci.nsIFactory]),
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   sendRequest: function(aUrl, aSessionId) {
     sendAsyncMessage('receiver-launching', aSessionId);
--- a/dom/presentation/tests/mochitest/PresentationSessionChromeScript1UA.js
+++ b/dom/presentation/tests/mochitest/PresentationSessionChromeScript1UA.js
@@ -18,17 +18,17 @@ function debug(str) {
 }
 
 const originalFactoryData = [];
 var sessionId; // Store the uuid generated by PresentationRequest.
 var triggerControlChannelError = false; // For simulating error during control channel establishment.
 
 // control channel of sender
 const mockControlChannelOfSender = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
   set listener(listener) {
     // PresentationControllingInfo::SetControlChannel
     if (listener) {
       debug('set listener for mockControlChannelOfSender without null');
     } else {
       debug('set listener for mockControlChannelOfSender with null');
     }
     this._listener = listener;
@@ -88,17 +88,17 @@ const mockControlChannelOfSender = {
     this._listener
         .QueryInterface(Ci.nsIPresentationControlChannelListener)
         .onIceCandidate(candidate);
   },
 };
 
 // control channel of receiver
 const mockControlChannelOfReceiver = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
   set listener(listener) {
     // PresentationPresentingInfo::SetControlChannel
     if (listener) {
       debug('set listener for mockControlChannelOfReceiver without null');
     } else {
       debug('set listener for mockControlChannelOfReceiver with null');
     }
     this._listener = listener;
@@ -153,17 +153,17 @@ const mockControlChannelOfReceiver = {
 
     this._listener
         .QueryInterface(Ci.nsIPresentationControlChannelListener)
         .onIceCandidate(candidate);
   },
 };
 
 const mockDevice = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id:   'id',
   name: 'name',
   type: 'type',
   establishControlChannel: function(url, presentationId) {
     if (triggerControlChannelError) {
       throw Cr.NS_ERROR_FAILURE;
     }
     sendAsyncMessage('control-channel-established');
@@ -173,18 +173,18 @@ const mockDevice = {
     sendAsyncMessage('device-disconnected');
   },
   isRequestedUrlSupported: function(requestedUrl) {
     return true;
   },
 };
 
 const mockDevicePrompt = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevicePrompt,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevicePrompt,
+                                          Ci.nsIFactory]),
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(aIID);
   },
   set request(request) {
     this._request = request;
@@ -200,18 +200,18 @@ const mockDevicePrompt = {
     this._request.select(mockDevice);
   },
   simulateCancel: function() {
     this._request.cancel();
   }
 };
 
 const mockRequestUIGlue = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationRequestUIGlue,
-                                         Ci.nsIFactory]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationRequestUIGlue,
+                                          Ci.nsIFactory]),
   set promise(aPromise) {
     this._promise = aPromise
   },
   get promise() {
     return this._promise;
   },
   createInstance: function(aOuter, aIID) {
     if (aOuter) {
--- a/dom/presentation/tests/mochitest/test_presentation_datachannel_sessiontransport.html
+++ b/dom/presentation/tests/mochitest/test_presentation_datachannel_sessiontransport.html
@@ -37,17 +37,17 @@ var isClientReady = false;
 var isServerReady = false;
 var isClientClosed = false;
 var isServerClosed = false;
 
 var gResolve;
 var gReject;
 
 const clientCallback = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
   notifyTransportReady: function () {
     info("Client transport ready.");
 
     isClientReady = true;
     if (isClientReady && isServerReady) {
       gResolve();
     }
   },
@@ -61,17 +61,17 @@ const clientCallback = {
   },
   notifyData: function(aData) {
     is(aData, serverMessage, "Client transport receives data.");
     gResolve();
   },
 };
 
 const serverCallback = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
   notifyTransportReady: function () {
     info("Server transport ready.");
 
     isServerReady = true;
     if (isClientReady && isServerReady) {
       gResolve();
     }
   },
@@ -85,17 +85,17 @@ const serverCallback = {
   },
   notifyData: function(aData) {
     is(aData, clientMessage, "Server transport receives data.");
     gResolve()
   },
 };
 
 const clientListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
   onSessionTransport: function(aTransport) {
     info("Client Transport is built.");
     clientTransport = aTransport;
     clientTransport.callback = clientCallback;
   },
   onError: function(aError)  {
     ok(false, "client's builder reports error " + aError);
   },
@@ -116,17 +116,17 @@ const clientListener = {
     this._remoteBuilder = aRemoteBuilder;
   },
   set localBuilder(aLocalBuilder) {
     this._localBuilder = aLocalBuilder;
   },
 }
 
 const serverListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
   onSessionTransport: function(aTransport) {
     info("Server Transport is built.");
     serverTransport = aTransport;
     serverTransport.callback = serverCallback;
     serverTransport.enableDataNotification();
   },
   onError: function(aError)  {
     ok(false, "server's builder reports error " + aError);
--- a/dom/presentation/tests/xpcshell/test_multicast_dns_device_provider.js
+++ b/dom/presentation/tests/xpcshell/test_multicast_dns_device_provider.js
@@ -59,17 +59,17 @@ MockFactory.prototype = {
         return this._cls.QueryInterface(aIID);
       default:
         return null;
     }
   },
   lockFactory: function(aLock) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
 };
 
 function ContractHook(aContractID, aClass) {
   this._contractID = aContractID;
   this.classID = Cc[UUID_CONTRACT_ID].getService(Ci.nsIUUIDGenerator).generateUUID();
   this._newFactory = new MockFactory(aClass);
 
   if (!this.hookedMap.has(this._contractID)) {
@@ -127,17 +127,17 @@ ContractHook.prototype = {
     }
 
     return { classID: classID, factory: factory };
   }
 };
 
 function MockDNSServiceInfo() {}
 MockDNSServiceInfo.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceInfo]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceInfo]),
 
   set host(aHost) {
     this._host = aHost;
   },
 
   get host() {
     return this._host;
   },
@@ -190,18 +190,18 @@ MockDNSServiceInfo.prototype = {
     return this._attributes;
   }
 };
 
 function TestPresentationDeviceListener() {
   this.devices = {};
 }
 TestPresentationDeviceListener.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                         Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                          Ci.nsISupportsWeakReference]),
 
   addDevice: function(device) { this.devices[device.id] = device; },
   removeDevice: function(device) { delete this.devices[device.id]; },
   updateDevice: function(device) { this.devices[device.id] = device; },
   onSessionRequest: function(device, url, presentationId, controlChannel) {},
 
   count: function() {
     var size = 0, key;
@@ -227,23 +227,23 @@ function createDevice(host, port, servic
 }
 
 function registerService() {
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, true);
 
   let deferred = Promise.defer();
 
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {},
     registerService: function(serviceInfo, listener) {
       deferred.resolve();
       this.serviceRegistered++;
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: () => {
           this.serviceUnregistered++;
         }
       };
     },
     resolveService: function(serviceInfo, listener) {},
     serviceRegistered: 0,
     serviceUnregistered: 0
@@ -251,18 +251,18 @@ function registerService() {
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
 
   Assert.equal(mockObj.serviceRegistered, 0);
   Assert.equal(mockObj.serviceUnregistered, 0);
 
   // Register
   provider.listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {},
     removeDevice: function(device) {},
     updateDevice: function(device) {},
   };
 
   deferred.promise.then(function() {
     Assert.equal(mockObj.serviceRegistered, 1);
     Assert.equal(mockObj.serviceUnregistered, 0);
@@ -277,32 +277,32 @@ function registerService() {
 }
 
 function noRegisterService() {
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, false);
 
   let deferred = Promise.defer();
 
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {},
     registerService: function(serviceInfo, listener) {
       deferred.resolve();
       Assert.ok(false, "should not register service if not discoverable");
     },
     resolveService: function(serviceInfo, listener) {},
   };
 
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
 
   // Try register
   provider.listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {},
     removeDevice: function(device) {},
     updateDevice: function(device) {},
   };
 
   let race = Promise.race([
     deferred.promise,
     sleep(1000),
@@ -316,23 +316,23 @@ function noRegisterService() {
 }
 
 function registerServiceDynamically() {
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, false);
 
   let deferred = Promise.defer();
 
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {},
     registerService: function(serviceInfo, listener) {
       deferred.resolve();
       this.serviceRegistered++;
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: () => {
           this.serviceUnregistered++;
         }
       };
     },
     resolveService: function(serviceInfo, listener) {},
     serviceRegistered: 0,
     serviceUnregistered: 0
@@ -340,18 +340,18 @@ function registerServiceDynamically() {
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
 
   Assert.equal(mockObj.serviceRegistered, 0);
   Assert.equal(mockObj.serviceRegistered, 0);
 
   // Try Register
   provider.listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {},
     removeDevice: function(device) {},
     updateDevice: function(device) {},
   };
 
   Assert.equal(mockObj.serviceRegistered, 0);
   Assert.equal(mockObj.serviceUnregistered, 0);
 
@@ -379,25 +379,25 @@ function registerServiceDynamically() {
 function addDevice() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, true);
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceName, mockDevice.serviceName);
       Assert.equal(serviceInfo.serviceType, mockDevice.serviceType);
       listener.onServiceResolved(createDevice(mockDevice.host,
@@ -429,25 +429,25 @@ function addDevice() {
 function filterDevice() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, true);
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceName, mockDevice.serviceName);
       Assert.equal(serviceInfo.serviceType, mockDevice.serviceType);
       listener.onServiceResolved(createDevice(mockDevice.host,
@@ -455,18 +455,18 @@ function filterDevice() {
                                               mockDevice.serviceName,
                                               mockDevice.serviceType));
     }
   };
 
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {
       let tests = [
         { requestedUrl: "app://fling-player.gaiamobile.org/index.html", supported: true },
         { requestedUrl: "app://notification-receiver.gaiamobile.org/index.html", supported: true },
         { requestedUrl: "http://example.com", supported: true },
         { requestedUrl: "https://example.com", supported: true },
         { requestedUrl: "ftp://example.com", supported: false },
         { requestedUrl: "app://unknown-app-id", supported: false },
@@ -499,60 +499,60 @@ function handleSessionRequest() {
 
   Services.prefs.setCharPref(PREF_DEVICENAME, testDeviceName);
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
   let mockSDObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       listener.onServiceResolved(createDevice(mockDevice.host,
                                               mockDevice.port,
                                               mockDevice.serviceName,
                                               mockDevice.serviceType));
     }
   };
 
   let mockServerObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlService]),
     connect: function(deviceInfo) {
       this.request = {
         deviceInfo: deviceInfo,
       };
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
       };
     },
     id: "",
     version: LATEST_VERSION,
     isCompatibleServer: function(version) {
       return this.version === version;
     }
   };
 
   let contractHookSD = new ContractHook(SD_CONTRACT_ID, mockSDObj);
   let contractHookServer = new ContractHook(SERVER_CONTRACT_ID, mockServerObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {
       this.device = device;
     },
   };
 
   provider.listener = listener;
 
   let controlChannel = listener.device.establishControlChannel();
@@ -571,80 +571,80 @@ function handleOnSessionRequest() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, true);
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, true);
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
   let mockSDObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       listener.onServiceResolved(createDevice(mockDevice.host,
                                               mockDevice.port,
                                               mockDevice.serviceName,
                                               mockDevice.serviceType));
     }
   };
 
   let mockServerObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlService]),
     startServer: function() {},
     sessionRequest: function() {},
     close: function() {},
     id: '',
     version: LATEST_VERSION,
     port: 0,
     listener: null,
   };
 
   let contractHookSD = new ContractHook(SD_CONTRACT_ID, mockSDObj);
   let contractHookServer = new ContractHook(SERVER_CONTRACT_ID, mockServerObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {},
     removeDevice: function(device) {},
     updateDevice: function(device) {},
     onSessionRequest: function(device, url, presentationId, controlChannel) {
       Assert.ok(true, "receive onSessionRequest event");
       this.request = {
         deviceId: device.id,
         url: url,
         presentationId: presentationId,
       };
     }
   };
 
   provider.listener = listener;
 
   const deviceInfo = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPDeviceInfo]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPDeviceInfo]),
     id: mockDevice.host,
     address: mockDevice.host,
     port: 54321,
   };
 
   const testUrl = "http://example.com";
   const testPresentationId = "test-presentation-id";
   const testControlChannel = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
   };
   provider.QueryInterface(Ci.nsIPresentationControlServerListener)
           .onSessionRequest(deviceInfo, testUrl, testPresentationId, testControlChannel);
 
   Assert.equal(listener.request.deviceId, deviceInfo.id);
   Assert.equal(listener.request.url, testUrl);
   Assert.equal(listener.request.presentationId, testPresentationId);
 
@@ -653,39 +653,39 @@ function handleOnSessionRequest() {
   run_next_test();
 }
 
 function handleOnSessionRequestFromUnknownDevice() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, false);
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, true);
 
   let mockSDObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {},
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {}
   };
 
   let mockServerObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlService]),
     startServer: function() {},
     sessionRequest: function() {},
     close: function() {},
     id: '',
     version: LATEST_VERSION,
     port: 0,
     listener: null,
   };
 
   let contractHookSD = new ContractHook(SD_CONTRACT_ID, mockSDObj);
   let contractHookServer = new ContractHook(SERVER_CONTRACT_ID, mockServerObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {
       Assert.ok(false, "shouldn't create any new device");
     },
     removeDevice: function(device) {
       Assert.ok(false, "shouldn't remote any device");
     },
     updateDevice: function(device) {
       Assert.ok(false, "shouldn't update any device");
@@ -698,26 +698,26 @@ function handleOnSessionRequestFromUnkno
         presentationId: presentationId,
       };
     }
   };
 
   provider.listener = listener;
 
   const deviceInfo = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPDeviceInfo]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPDeviceInfo]),
     id: "unknown-device.local",
     address: "unknown-device.local",
     port: 12345,
   };
 
   const testUrl = "http://example.com";
   const testPresentationId = "test-presentation-id";
   const testControlChannel = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
   };
   provider.QueryInterface(Ci.nsIPresentationControlServerListener)
           .onSessionRequest(deviceInfo, testUrl, testPresentationId, testControlChannel);
 
   Assert.equal(listener.request.deviceId, deviceInfo.id);
   Assert.equal(listener.request.url, testUrl);
   Assert.equal(listener.request.presentationId, testPresentationId);
 
@@ -726,30 +726,30 @@ function handleOnSessionRequestFromUnkno
   run_next_test();
 }
 
 function noAddDevice() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, false);
 
   let mockDevice = createDevice("device.local", 12345, "service.name", SERVICE_TYPE);
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       Assert.ok(false, "shouldn't perform any device discovery");
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
     }
   };
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
 
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {},
     removeDevice: function(device) {},
     updateDevice: function(device) {},
   };
   provider.listener = listener;
   provider.forceDiscovery();
   provider.listener = null;
 
@@ -763,51 +763,51 @@ function ignoreIncompatibleDevice() {
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
 
   let deferred = Promise.defer();
 
   let mockSDObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {
       deferred.resolve();
       listener.onServiceRegistered(createDevice("",
                                                 54321,
                                                 mockDevice.serviceName,
                                                 mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceName, mockDevice.serviceName);
       Assert.equal(serviceInfo.serviceType, mockDevice.serviceType);
       listener.onServiceResolved(createDevice(mockDevice.host,
                                               mockDevice.port,
                                               mockDevice.serviceName,
                                               mockDevice.serviceType));
     }
   };
 
   let mockServerObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlService]),
     startServer: function() {
       Services.tm.dispatchToMainThread(() => {
         this.listener.onServerReady(this.port, this.certFingerprint);
       });
     },
     sessionRequest: function() {},
     close: function() {},
     id: '',
@@ -848,51 +848,51 @@ function ignoreSelfDevice() {
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
 
   let deferred = Promise.defer();
   let mockSDObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {
       deferred.resolve();
       listener.onServiceRegistered(createDevice("",
                                                 0,
                                                 mockDevice.serviceName,
                                                 mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceName, mockDevice.serviceName);
       Assert.equal(serviceInfo.serviceType, mockDevice.serviceType);
       listener.onServiceResolved(createDevice(mockDevice.host,
                                               mockDevice.port,
                                               mockDevice.serviceName,
                                               mockDevice.serviceType));
     }
   };
 
   let mockServerObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlService]),
     startServer: function() {
       Services.tm.dispatchToMainThread(() => {
         this.listener.onServerReady(this.port, this.certFingerprint);
       });
     },
     sessionRequest: function() {},
     close: function() {},
     id: '',
@@ -929,25 +929,25 @@ function ignoreSelfDevice() {
 function addDeviceDynamically() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, false);
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceName, mockDevice.serviceName);
       Assert.equal(serviceInfo.serviceType, mockDevice.serviceType);
       listener.onServiceResolved(createDevice(mockDevice.host,
@@ -986,29 +986,29 @@ function updateDevice() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, true);
 
   let mockDevice1 = createDevice("A.local", 12345, "N1", SERVICE_TYPE);
   let mockDevice2 = createDevice("A.local", 23456, "N2", SERVICE_TYPE);
 
   let mockObj = {
     discovered: false,
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
 
       if (!this.discovered) {
         listener.onServiceFound(mockDevice1);
       } else {
         listener.onServiceFound(mockDevice2);
       }
       this.discovered = true;
 
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {
           listener.onDiscoveryStopped(serviceType);
         }
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceType, SERVICE_TYPE);
@@ -1020,18 +1020,18 @@ function updateDevice() {
         Assert.ok(false);
       }
     }
   };
 
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
 
     addDevice: function(device) {
       Assert.ok(!this.isDeviceAdded);
       Assert.equal(device.id, mockDevice1.host);
       Assert.equal(device.name, mockDevice1.serviceName);
       this.isDeviceAdded = true;
     },
     removeDevice: function(device) { Assert.ok(false); },
@@ -1073,31 +1073,31 @@ function diffDiscovery() {
 
   let mockDevice1 = createDevice("A.local", 12345, "N1", SERVICE_TYPE);
   let mockDevice2 = createDevice("B.local", 23456, "N2", SERVICE_TYPE);
   let mockDevice3 = createDevice("C.local", 45678, "N3", SERVICE_TYPE);
 
   let mockObj = {
     discovered: false,
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
 
       if (!this.discovered) {
         listener.onServiceFound(mockDevice1);
         listener.onServiceFound(mockDevice2);
       } else {
         listener.onServiceFound(mockDevice1);
         listener.onServiceFound(mockDevice3);
       }
       this.discovered = true;
 
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {
           listener.onDiscoveryStopped(serviceType);
         }
       };
     },
     registerService: function(serviceInfo, listener) {},
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceType, SERVICE_TYPE);
@@ -1155,32 +1155,32 @@ function serverClosed() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, true);
 
   let mockDevice = createDevice("device.local",
                                 12345,
                                 "service.name",
                                 SERVICE_TYPE);
 
   let mockObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {
       listener.onDiscoveryStarted(serviceType);
       listener.onServiceFound(createDevice("",
                                            0,
                                            mockDevice.serviceName,
                                            mockDevice.serviceType));
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: function() {}
       };
     },
     registerService: function(serviceInfo, listener) {
       this.serviceRegistered++;
       return {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsICancelable]),
         cancel: () => {
           this.serviceUnregistered++;
         }
       };
     },
     resolveService: function(serviceInfo, listener) {
       Assert.equal(serviceInfo.serviceName, mockDevice.serviceName);
       Assert.equal(serviceInfo.serviceType, mockDevice.serviceType);
@@ -1195,18 +1195,18 @@ function serverClosed() {
   let contractHook = new ContractHook(SD_CONTRACT_ID, mockObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
 
   Assert.equal(mockObj.serviceRegistered, 0);
   Assert.equal(mockObj.serviceUnregistered, 0);
 
   // Register
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) { this.devices.push(device); },
     removeDevice: function(device) {},
     updateDevice: function(device) {},
     devices: []
   };
   Assert.equal(listener.devices.length, 0);
 
   provider.listener = listener;
@@ -1233,28 +1233,28 @@ function serverClosed() {
 
 function serverRetry() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, false);
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, true);
 
   let isRetrying = false;
 
   let mockSDObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIDNSServiceDiscovery]),
     startDiscovery: function(serviceType, listener) {},
     registerService: function(serviceInfo, listener) {
       Assert.ok(isRetrying, "register service after retrying startServer");
       provider.listener = null;
       run_next_test();
     },
     resolveService: function(serviceInfo, listener) {}
   };
 
   let mockServerObj = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlService]),
     startServer: function(encrypted, port) {
       if (!isRetrying) {
         isRetrying = true;
         Services.tm.dispatchToMainThread(() => {
           this.listener.onServerStopped(Cr.NS_ERROR_FAILURE);
         });
       } else {
         this.port = 54321;
@@ -1271,18 +1271,18 @@ function serverRetry() {
     certFingerprint: 'mock-cert-fingerprint',
     listener: null,
   };
 
   let contractHookSD = new ContractHook(SD_CONTRACT_ID, mockSDObj);
   let contractHookServer = new ContractHook(SERVER_CONTRACT_ID, mockServerObj);
   let provider = Cc[PROVIDER_CONTRACT_ID].createInstance(Ci.nsIPresentationDeviceProvider);
   let listener = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceListener,
-                                           Ci.nsISupportsWeakReference]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceListener,
+                                            Ci.nsISupportsWeakReference]),
     addDevice: function(device) {},
     removeDevice: function(device) {},
     updateDevice: function(device) {},
     onSessionRequest: function(device, url, presentationId, controlChannel) {}
   };
 
   provider.listener = listener;
 }
--- a/dom/presentation/tests/xpcshell/test_presentation_device_manager.js
+++ b/dom/presentation/tests/xpcshell/test_presentation_device_manager.js
@@ -11,41 +11,41 @@ const manager = Cc['@mozilla.org/present
                   .getService(Ci.nsIPresentationDeviceManager);
 
 function TestPresentationDevice() {}
 
 
 function TestPresentationControlChannel() {}
 
 TestPresentationControlChannel.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannel]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannel]),
   sendOffer: function(offer) {},
   sendAnswer: function(answer) {},
   disconnect: function() {},
   launch: function() {},
   terminate: function() {},
   reconnect: function() {},
   set listener(listener) {},
   get listener() {},
 };
 
 var testProvider = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDeviceProvider]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDeviceProvider]),
 
   forceDiscovery: function() {
   },
   set listener(listener) {
   },
   get listener() {
   },
 };
 
 const forbiddenRequestedUrl = 'http://example.com';
 var testDevice = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevice]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationDevice]),
   id: 'id',
   name: 'name',
   type: 'type',
   establishControlChannel: function(url, presentationId) {
     return null;
   },
   disconnect: function() {},
   isRequestedUrlSupported: function(requestedUrl) {
--- a/dom/presentation/tests/xpcshell/test_presentation_session_transport.js
+++ b/dom/presentation/tests/xpcshell/test_presentation_session_transport.js
@@ -24,28 +24,28 @@ const serverMessage = "Server Message";
 
 const address = Cc["@mozilla.org/supports-cstring;1"]
                   .createInstance(Ci.nsISupportsCString);
 address.data = "127.0.0.1";
 const addresses = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
 addresses.appendElement(address);
 
 const serverChannelDescription = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationChannelDescription]),
   type: 1,
   tcpAddress: addresses,
 };
 
 var isClientReady = false;
 var isServerReady = false;
 var isClientClosed = false;
 var isServerClosed = false;
 
 const clientCallback = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
   notifyTransportReady: function () {
     Assert.ok(true, "Client transport ready.");
 
     isClientReady = true;
     if (isClientReady && isServerReady) {
       run_next_test();
     }
   },
@@ -59,17 +59,17 @@ const clientCallback = {
   },
   notifyData: function(aData) {
     Assert.equal(aData, serverMessage, "Client transport receives data.");
     run_next_test();
   },
 };
 
 const serverCallback = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportCallback]),
   notifyTransportReady: function () {
     Assert.ok(true, "Server transport ready.");
 
     isServerReady = true;
     if (isClientReady && isServerReady) {
       run_next_test();
     }
   },
@@ -83,30 +83,30 @@ const serverCallback = {
   },
   notifyData: function(aData) {
     Assert.equal(aData, clientMessage, "Server transport receives data.");
     run_next_test();
   },
 };
 
 const clientListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
   onSessionTransport(aTransport) {
     Assert.ok(true, "Client Transport is built.");
     clientTransport = aTransport;
     clientTransport.callback = clientCallback;
 
     if (serverTransport) {
       run_next_test();
     }
   }
 }
 
 const serverListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationSessionTransportBuilderListener]),
   onSessionTransport(aTransport) {
     Assert.ok(true, "Server Transport is built.");
     serverTransport = aTransport;
     serverTransport.callback = serverCallback;
     serverTransport.enableDataNotification();
 
     if (clientTransport) {
       run_next_test();
--- a/dom/presentation/tests/xpcshell/test_tcp_control_channel.js
+++ b/dom/presentation/tests/xpcshell/test_tcp_control_channel.js
@@ -31,17 +31,17 @@ function TestDescription(aType, aTcpAddr
                     .createInstance(Ci.nsISupportsCString);
     wrapper.data = address;
     this.tcpAddress.appendElement(wrapper);
   }
   this.tcpPort = aTcpPort;
 }
 
 TestDescription.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationChannelDescription]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationChannelDescription]),
 }
 
 const CONTROLLER_CONTROL_CHANNEL_PORT = 36777;
 const PRESENTER_CONTROL_CHANNEL_PORT = 36888;
 
 var CLOSE_CONTROL_CHANNEL_REASON = Cr.NS_OK;
 var candidate;
 
@@ -121,34 +121,34 @@ function testPresentationServer() {
           this.status = 'opened';
         },
         notifyDisconnected: function(aReason) {
           Assert.equal(this.status, 'onOffer', '4. presenterControlChannel: closed');
           Assert.equal(aReason, CLOSE_CONTROL_CHANNEL_REASON, 'presenterControlChannel notify closed');
           this.status = 'closed';
           yayFuncs.controllerControlChannelClose();
         },
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
       };
     },
     onReconnectRequest: function(deviceInfo, url, presentationId, controlChannel) {
       Assert.equal(url, 'http://example.com', 'expected url');
       Assert.equal(presentationId, 'testPresentationId', 'expected presentation id');
       yayFuncs.presenterControlChannelReconnect();
     },
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlServerListener]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlServerListener]),
   };
 
   let presenterDeviceInfo = {
     id: 'presentatorID',
     address: '127.0.0.1',
     port: PRESENTER_CONTROL_CHANNEL_PORT,
     certFingerprint: pcs.certFingerprint,
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPDeviceInfo]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPDeviceInfo]),
   };
 
   let controllerControlChannel = pcs.connect(presenterDeviceInfo);
 
   controllerControlChannel.listener = {
     status: 'created',
     onOffer: function(offer) {
       Assert.ok(false, 'get offer');
@@ -191,20 +191,20 @@ function testPresentationServer() {
       let reconnectControllerControlChannel = pcs.connect(presenterDeviceInfo);
       reconnectControllerControlChannel.listener = {
         notifyConnected: function() {
           reconnectControllerControlChannel.reconnect('testPresentationId', 'http://example.com');
         },
         notifyReconnected: function() {
           yayFuncs.controllerControlChannelReconnect();
         },
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
       };
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
   };
 }
 
 function terminateRequest() {
   let yayFuncs = makeJointSuccess(['controllerControlChannelConnected',
                                    'controllerControlChannelDisconnected',
                                    'presenterControlChannelDisconnected',
                                    'terminatedByController',
@@ -231,47 +231,47 @@ function terminateRequest() {
 
             terminatePhase = 'receiver';
             controllerControlChannel.terminate('testPresentationId');
           },
           notifyDisconnected: function(aReason) {
             Assert.equal(aReason, CLOSE_CONTROL_CHANNEL_REASON, 'controllerControlChannel notify disconncted');
             yayFuncs.controllerControlChannelDisconnected();
           },
-          QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+          QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
         };
       } else {
         Assert.equal(deviceInfo.id, presenterDeviceInfo.id, 'expected presenter device id');
         Assert.equal(isFromReceiver, true, 'expected request from receiver');
         yayFuncs.terminatedByReceiver();
         presenterControlChannel.disconnect(CLOSE_CONTROL_CHANNEL_REASON);
       }
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPPresentationServerListener]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPPresentationServerListener]),
   };
 
   let presenterDeviceInfo = {
     id: 'presentatorID',
     address: '127.0.0.1',
     port: PRESENTER_CONTROL_CHANNEL_PORT,
     certFingerprint: pcs.certFingerprint,
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPDeviceInfo]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPDeviceInfo]),
   };
 
   let presenterControlChannel = pcs.connect(presenterDeviceInfo);
 
   presenterControlChannel.listener = {
     notifyConnected: function() {
       presenterControlChannel.terminate('testPresentationId');
     },
     notifyDisconnected: function(aReason) {
       Assert.equal(aReason, CLOSE_CONTROL_CHANNEL_REASON, '4. presenterControlChannel notify disconnected');
       yayFuncs.presenterControlChannelDisconnected();
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
   };
 }
 
 function terminateRequestAbnormal() {
   let yayFuncs = makeJointSuccess(['controllerControlChannelConnected',
                                    'controllerControlChannelDisconnected',
                                    'presenterControlChannelDisconnected']);
   let controllerControlChannel;
@@ -290,41 +290,41 @@ function terminateRequestAbnormal() {
           notifyConnected: function() {
           Assert.ok(true, 'control channel notify connected');
           yayFuncs.controllerControlChannelConnected();
         },
         notifyDisconnected: function(aReason) {
           Assert.equal(aReason, Cr.NS_ERROR_FAILURE, 'controllerControlChannel notify disconncted with error');
           yayFuncs.controllerControlChannelDisconnected();
         },
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
       };
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPPresentationServerListener]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPPresentationServerListener]),
   };
 
   let presenterDeviceInfo = {
     id: 'presentatorID',
     address: '127.0.0.1',
     port: PRESENTER_CONTROL_CHANNEL_PORT,
     certFingerprint: pcs.certFingerprint,
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsITCPDeviceInfo]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITCPDeviceInfo]),
   };
 
   let presenterControlChannel = pcs.connect(presenterDeviceInfo);
 
   presenterControlChannel.listener = {
     notifyConnected: function() {
       presenterControlChannel.terminate('testPresentationId');
     },
     notifyDisconnected: function(aReason) {
       Assert.equal(aReason, Cr.NS_ERROR_FAILURE, '4. presenterControlChannel notify disconnected with error');
       yayFuncs.presenterControlChannelDisconnected();
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPresentationControlChannelListener]),
   };
 }
 
 function setOffline() {
   pcs.listener = {
     onServerReady: function(aPort, aCertFingerprint) {
       Assert.notEqual(aPort, 0, 'TCPPresentationServer port changed and the port should be valid');
       pcs.close();
--- a/dom/push/Push.js
+++ b/dom/push/Push.js
@@ -32,19 +32,19 @@ function Push() {
 
 Push.prototype = {
   __proto__: DOMRequestIpcHelper.prototype,
 
   contractID: "@mozilla.org/push/PushManager;1",
 
   classID : PUSH_CID,
 
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer,
-                                          Ci.nsISupportsWeakReference,
-                                          Ci.nsIObserver]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer,
+                                           Ci.nsISupportsWeakReference,
+                                           Ci.nsIObserver]),
 
   init: function(win) {
     console.debug("init()");
 
     this._window = win;
 
     this.initDOMRequestHelper(win);
 
@@ -177,26 +177,26 @@ Push.prototype = {
   },
 
   _requestPermission: function(allowCallback, cancelCallback) {
     // Create an array with a single nsIContentPermissionType element.
     let type = {
       type: "desktop-notification",
       access: null,
       options: [],
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionType]),
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionType]),
     };
     let typeArray = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
     typeArray.appendElement(type);
 
     // create a nsIContentPermissionRequest
     let request = {
       types: typeArray,
       principal: this._principal,
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIContentPermissionRequest]),
       allow: allowCallback,
       cancel: cancelCallback,
       window: this._window,
     };
 
     // Using askPermission from nsIDOMWindowUtils that takes care of the
     // remoting if needed.
     let windowUtils = this._window.QueryInterface(Ci.nsIInterfaceRequestor)
@@ -207,17 +207,17 @@ Push.prototype = {
 
 function PushSubscriptionCallback(pushManager, resolve, reject) {
   this.pushManager = pushManager;
   this.resolve = resolve;
   this.reject = reject;
 }
 
 PushSubscriptionCallback.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPushSubscriptionCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPushSubscriptionCallback]),
 
   onPushSubscription: function(ok, subscription) {
     let {pushManager} = this;
     if (!Components.isSuccessCode(ok)) {
       this._rejectWithError(ok);
       return;
     }
 
--- a/dom/push/PushComponents.js
+++ b/dom/push/PushComponents.js
@@ -44,17 +44,17 @@ const OBSERVER_TOPIC_SUBSCRIPTION_MODIFI
 function PushServiceBase() {
   this.wrappedJSObject = this;
   this._addListeners();
 }
 
 PushServiceBase.prototype = {
   classID: Components.ID("{daaa8d73-677e-4233-8acd-2c404bd01658}"),
   contractID: "@mozilla.org/push/Service;1",
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
     Ci.nsIPushService,
     Ci.nsIPushQuotaManager,
     Ci.nsIPushErrorReporter,
   ]),
 
   pushTopic: OBSERVER_TOPIC_PUSH,
@@ -454,17 +454,17 @@ Object.assign(PushServiceContent.prototy
 });
 
 /** `PushSubscription` instances are passed to all subscription callbacks. */
 function PushSubscription(props) {
   this._props = props;
 }
 
 PushSubscription.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPushSubscription]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPushSubscription]),
 
   /** The URL for sending messages to this subscription. */
   get endpoint() {
     return this._props.endpoint;
   },
 
   /** The last time a message was sent to this subscription. */
   get lastPush() {
--- a/dom/push/test/mockpushserviceparent.js
+++ b/dom/push/test/mockpushserviceparent.js
@@ -25,20 +25,17 @@ function MockWebSocketParent(originalURI
 }
 
 MockWebSocketParent.prototype = {
   _originalURI: null,
 
   _listener: null,
   _context: null,
 
-  QueryInterface: XPCOMUtils.generateQI([
-    Ci.nsISupports,
-    Ci.nsIWebSocketChannel
-  ]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebSocketChannel]),
 
   get originalURI() {
     return this._originalURI;
   },
 
   asyncOpen(uri, origin, windowId, listener, context) {
     this._listener = listener;
     this._context = context;
--- a/dom/push/test/xpcshell/PushServiceHandler.js
+++ b/dom/push/test/xpcshell/PushServiceHandler.js
@@ -14,16 +14,16 @@ function PushServiceHandler() {
   this.observed = [];
   Services.obs.addObserver(this, pushService.pushTopic);
   Services.obs.addObserver(this, pushService.subscriptionChangeTopic);
   Services.obs.addObserver(this, pushService.subscriptionModifiedTopic);
 }
 
 PushServiceHandler.prototype = {
   classID: Components.ID("{bb7c5199-c0f7-4976-9f6d-1306e32c5591}"),
-  QueryInterface: XPCOMUtils.generateQI([]),
+  QueryInterface: ChromeUtils.generateQI([]),
 
   observe(subject, topic, data) {
     this.observed.push({ subject, topic, data });
   },
 }
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PushServiceHandler]);
--- a/dom/push/test/xpcshell/head.js
+++ b/dom/push/test/xpcshell/head.js
@@ -193,20 +193,17 @@ MockWebSocket.prototype = {
   _onRegister: null,
   _onUnregister: null,
   _onACK: null,
   _onPing: null,
 
   _listener: null,
   _context: null,
 
-  QueryInterface: XPCOMUtils.generateQI([
-    Ci.nsISupports,
-    Ci.nsIWebSocketChannel
-  ]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebSocketChannel]),
 
   get originalURI() {
     return this._originalURI;
   },
 
   asyncOpen(uri, origin, windowId, listener, context) {
     this._listener = listener;
     this._context = context;
--- a/dom/push/test/xpcshell/test_permissions.js
+++ b/dom/push/test/xpcshell/test_permissions.js
@@ -24,17 +24,17 @@ function run_test() {
 let unregisterDefers = {};
 
 function promiseUnregister(keyID) {
   return new Promise(r => unregisterDefers[keyID] = r);
 }
 
 function makePushPermission(url, capability) {
   return {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPermission]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPermission]),
     capability: Ci.nsIPermissionManager[capability],
     expireTime: 0,
     expireType: Ci.nsIPermissionManager.EXPIRE_NEVER,
     principal: Services.scriptSecurityManager.createCodebasePrincipal(
       Services.io.newURI(url), {}
     ),
     type: 'desktop-notification',
   };
--- a/dom/system/NetworkGeolocationProvider.js
+++ b/dom/system/NetworkGeolocationProvider.js
@@ -206,27 +206,27 @@ function WifiGeoCoordsObject(lat, lon, a
   this.latitude = lat;
   this.longitude = lon;
   this.accuracy = acc;
   this.altitude = alt;
   this.altitudeAccuracy = altacc;
 }
 
 WifiGeoCoordsObject.prototype = {
-  QueryInterface:  XPCOMUtils.generateQI([Ci.nsIDOMGeoPositionCoords])
+  QueryInterface:  ChromeUtils.generateQI([Ci.nsIDOMGeoPositionCoords])
 };
 
 function WifiGeoPositionObject(lat, lng, acc) {
   this.coords = new WifiGeoCoordsObject(lat, lng, acc, 0, 0);
   this.address = null;
   this.timestamp = Date.now();
 }
 
 WifiGeoPositionObject.prototype = {
-  QueryInterface:   XPCOMUtils.generateQI([Ci.nsIDOMGeoPosition])
+  QueryInterface:   ChromeUtils.generateQI([Ci.nsIDOMGeoPosition])
 };
 
 function WifiGeoPositionProvider() {
   try {
     gLoggingEnabled = Services.prefs.getBoolPref("geo.wifi.logging.enabled");
   } catch (e) {}
 
   try {
@@ -239,20 +239,20 @@ function WifiGeoPositionProvider() {
 
   this.wifiService = null;
   this.timer = null;
   this.started = false;
 }
 
 WifiGeoPositionProvider.prototype = {
   classID:          Components.ID("{77DA64D3-7458-4920-9491-86CC9914F904}"),
-  QueryInterface:   XPCOMUtils.generateQI([Ci.nsIGeolocationProvider,
-                                           Ci.nsIWifiListener,
-                                           Ci.nsITimerCallback,
-                                           Ci.nsIObserver]),
+  QueryInterface:   ChromeUtils.generateQI([Ci.nsIGeolocationProvider,
+                                            Ci.nsIWifiListener,
+                                            Ci.nsITimerCallback,
+                                            Ci.nsIObserver]),
   listener: null,
 
   resetTimer: function() {
     if (this.timer) {
       this.timer.cancel();
       this.timer = null;
     }
     // wifi thread triggers WifiGeoPositionProvider to proceed, with no wifi, do manual timeout
--- a/dom/tests/browser/browser_ConsoleAPI_originAttributes.js
+++ b/dom/tests/browser/browser_ConsoleAPI_originAttributes.js
@@ -5,17 +5,17 @@ const ConsoleAPIStorage = Cc["@mozilla.o
       .getService(Ci.nsIConsoleAPIStorage);
 
 const {WebExtensionPolicy} = Cu.getGlobalForObject(ChromeUtils.import("resource://gre/modules/Services.jsm", {}));
 
 const FAKE_ADDON_ID = "test-webext-addon@mozilla.org";
 const EXPECTED_CONSOLE_ID = `addon/${FAKE_ADDON_ID}`;
 const EXPECTED_CONSOLE_MESSAGE_CONTENT = "fake-webext-addon-test-log-message";
 const ConsoleObserver = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   init() {
     Services.obs.addObserver(this, "console-api-log-event");
   },
 
   uninit() {
     Services.obs.removeObserver(this, "console-api-log-event");
   },
--- a/dom/tests/browser/browser_ConsoleStorageAPITests.js
+++ b/dom/tests/browser/browser_ConsoleStorageAPITests.js
@@ -28,17 +28,17 @@ add_task(async function()
   let observerPromise = ContentTask.spawn(browser, null, async function(opt) {
     const TEST_URI = "http://example.com/browser/dom/tests/browser/test-console-api.html";
     let ConsoleAPIStorage = Cc["@mozilla.org/consoleAPI-storage;1"]
           .getService(Ci.nsIConsoleAPIStorage);
 
     let observerPromise = new Promise(resolve => {
       let apiCallCount = 0;
       let ConsoleObserver = {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
         observe: function(aSubject, aTopic, aData) {
           if (aTopic == "console-storage-cache-event") {
             apiCallCount++;
             if (apiCallCount == 4) {
               let windowId = content.window.QueryInterface(Ci.nsIInterfaceRequestor)
                     .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
 
--- a/dom/tests/browser/browser_bug1004814.js
+++ b/dom/tests/browser/browser_bug1004814.js
@@ -5,17 +5,17 @@
 
 add_task(async function() {
   await BrowserTestUtils.withNewTab("about:blank", async function(aBrowser) {
     let duration = await ContentTask.spawn(aBrowser, null, function (opts) {
       const TEST_URI = "http://example.com/browser/dom/tests/browser/test_bug1004814.html";
 
       return new Promise(resolve => {
         let ConsoleObserver = {
-          QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+          QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
           observe: function(aSubject, aTopic, aData) {
             var obj = aSubject.wrappedJSObject;
             if (obj.arguments.length != 1 || obj.arguments[0] != 'bug1004814' ||
                 obj.level != 'timeEnd') {
               return;
             }
 
--- a/dom/tests/mochitest/bugs/test_bug61098.html
+++ b/dom/tests/mochitest/bugs/test_bug61098.html
@@ -32,17 +32,17 @@ function registerMockPromptService()
   var XPCOMUtils = SpecialPowers.Cu.import("resource://gre/modules/XPCOMUtils.jsm").XPCOMUtils;
   var Ci = SpecialPowers.Ci;
 
   function MockPrompt(aDOMWindow) {
     this.domWindow = SpecialPowers.unwrap(aDOMWindow);
   }
 
   MockPrompt.prototype = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt]),
 
     domWindow : null,
 
     _toggleModalState: function()
     {
       // The real prompt service puts the window into a modal state
       // immediately before showing a modal prompt, and leaves the modal state
       // when the prompt is dismissed by the user. This mock prompt doesn't
@@ -149,17 +149,17 @@ function registerMockPromptService()
   // Override the prompt service with our own so that we can test
   // modal dialogs
 
   function MockPromptService()
   {
   }
 
   MockPromptService.prototype = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptFactory, Ci.nsIPromptService]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptFactory, Ci.nsIPromptService]),
 
     getPrompt: function(aDOMWindow, aIID)
     {
         return new MockPrompt(aDOMWindow);
     },
 
     alert: function(aParent, aDialogTitle, aText)
     {
--- a/dom/websocket/tests/test_websocket_frame.html
+++ b/dom/websocket/tests/test_websocket_frame.html
@@ -31,17 +31,17 @@ var innerId =
         .getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
 ok(innerId, "We have a valid innerWindowID: " + innerId);
 
 var service = Cc["@mozilla.org/websocketevent/service;1"]
                 .getService(Ci.nsIWebSocketEventService);
 ok(!!service, "We have the nsIWebSocketEventService");
 
 var listener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebSocketEventListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebSocketEventListener]),
 
   webSocketCreated: function(aWebSocketSerialID, aURI, aProtocols) {
     info("WebSocketCreated");
 
     is(aURI, URI, "URI matches");
     is(aProtocols, "frame", "Protocol matches");
 
     webSocketCreatedCounter++;
--- a/dom/workers/test/extensions/bootstrap/bootstrap.js
+++ b/dom/workers/test/extensions/bootstrap/bootstrap.js
@@ -91,17 +91,17 @@ WorkerTestBootstrap.prototype = {
         gWorkerAndCallback.terminate();
         break;
 
       default:
         throw new Error("Unknown worker command");
     }
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver])
 };
 
 var gFactory = {
   register: function() {
     var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
     var classID = Components.ID("{36b5df0b-8dcf-4aa2-9c45-c51d871295f9}");
     var description = "WorkerTestBootstrap";
--- a/dom/workers/test/test_extensionBootstrap.xul
+++ b/dom/workers/test/test_extensionBootstrap.xul
@@ -36,17 +36,17 @@
                                             "." + symbol),
                  true,
                  "Symbol '" + symbol + "' present during '" + stage + "'");
             }
           }
 
           SimpleTest.finish();
         },
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver])
       };
 
       var workertestbootstrap = Cc["@mozilla.org/test/workertestbootstrap;1"].
                                 createInstance(Ci.nsIObserver);
 
       workertestbootstrap.observe(observer, "postMessage", message);
 
       SimpleTest.waitForExplicitFinish();
--- a/dom/xslt/xslt/txEXSLTRegExFunctions.js
+++ b/dom/xslt/xslt/txEXSLTRegExFunctions.js
@@ -11,17 +11,17 @@ function txEXSLTRegExFunctions()
 {
 }
 
 var SingletonInstance = null;
 
 txEXSLTRegExFunctions.prototype = {
     classID: EXSLT_REGEXP_CID,
 
-    QueryInterface: XPCOMUtils.generateQI([Ci.txIEXSLTRegExFunctions]),
+    QueryInterface: ChromeUtils.generateQI([Ci.txIEXSLTRegExFunctions]),
 
     // txIEXSLTRegExFunctions
     match: function(str, regex, flags, doc) {
         var docFrag = doc.createDocumentFragment();
         var re = new RegExp(regex, flags);
         var matches = str.match(re);
         if (matches != null) {
             for (var i = 0; i < matches.length; ++i) {
--- a/editor/composer/test/test_bug1266815.html
+++ b/editor/composer/test/test_bug1266815.html
@@ -33,17 +33,17 @@ var helperAppDlgPromise = new Promise(fu
 
   HelperAppLauncherDialog.prototype = {
     show: function(aLauncher, aWindowContext, aReason) {
       ok(true, "Whether showing Dialog");
       resolve();
       registrar.unregisterFactory(MOCK_HELPERAPP_DIALOG_CID,
                                   mockHelperAppService);
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIHelperAppLauncherDialog])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIHelperAppLauncherDialog])
   };
 
   mockHelperAppService = XPCOMUtils._getFactory(HelperAppLauncherDialog);
   registrar.registerFactory(MOCK_HELPERAPP_DIALOG_CID, "",
                             HELPERAPP_DIALOG_CONTRACT_ID,
                             mockHelperAppService);
 });
 
--- a/editor/libeditor/EditorUtils.js
+++ b/editor/libeditor/EditorUtils.js
@@ -9,17 +9,17 @@ ChromeUtils.import("resource://gre/modul
 
 const EDITORUTILS_CID = Components.ID('{12e63991-86ac-4dff-bb1a-703495d67d17}');
 
 function EditorUtils() {
 }
 
 EditorUtils.prototype = {
   classID: EDITORUTILS_CID,
-  QueryInterface: XPCOMUtils.generateQI([ Ci.nsIEditorUtils ]),
+  QueryInterface: ChromeUtils.generateQI([ Ci.nsIEditorUtils ]),
 
   slurpBlob(aBlob, aScope, aListener) {
     let reader = new aScope.FileReader();
     reader.addEventListener("load", (event) => {
       aListener.onResult(event.target.result);
     });
     reader.addEventListener("error", (event) => {
       aListener.onError(event.target.error.message);
--- a/extensions/cookie/test/unit/test_permmanager_migrate_4-7_no_history.js
+++ b/extensions/cookie/test/unit/test_permmanager_migrate_4-7_no_history.js
@@ -10,17 +10,17 @@ var PERMISSIONS_FILE_NAME = "permissions
 var CONTRACT_ID = "@mozilla.org/browser/nav-history-service;1";
 var factory = {
   createInstance: function() {
     throw new Error("There is no history service");
   },
   lockFactory: function() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
 };
 
 var newClassID = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID();
 
 var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 var oldClassID = registrar.contractIDToCID(CONTRACT_ID);
 var oldFactory = Components.manager.getClassObject(Cc[CONTRACT_ID], Ci.nsIFactory);
 registrar.unregisterFactory(oldClassID, oldFactory);
--- a/intl/l10n/Localization.jsm
+++ b/intl/l10n/Localization.jsm
@@ -267,17 +267,17 @@ class Localization {
    * This method should be called when there's a reason to believe
    * that language negotiation or available resources changed.
    */
   onLanguageChange() {
     this.ctxs = new CachedIterable(this.generateMessages(this.resourceIds));
   }
 }
 
-Localization.prototype.QueryInterface = XPCOMUtils.generateQI([
+Localization.prototype.QueryInterface = ChromeUtils.generateQI([
   Ci.nsISupportsWeakReference
 ]);
 
 /**
  * Format the value of a message into a string.
  *
  * This function is passed as a method to `keysFromContext` and resolve
  * a value of a single L10n Entity using provided `MessageContext`.
--- a/js/xpconnect/loader/XPCOMUtils.jsm
+++ b/js/xpconnect/loader/XPCOMUtils.jsm
@@ -497,17 +497,17 @@ var XPCOMUtils = {
     var factory = component.prototype._xpcom_factory;
     if (!factory) {
       factory = {
         createInstance: function(outer, iid) {
           if (outer)
             throw Cr.NS_ERROR_NO_AGGREGATION;
           return (new component()).QueryInterface(iid);
         },
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
       }
     }
     return factory;
   },
 
   /**
    * Allows you to fake a relative import. Expects the global object from the
    * module that's calling us, and the relative filename that we wish to import.
@@ -538,32 +538,32 @@ var XPCOMUtils = {
         if (this._instance === null) {
           this._instance = new aServiceConstructor();
         }
         return this._instance.QueryInterface(aIID);
       },
       lockFactory: function XPCU_SF_lockFactory(aDoLock) {
         throw Cr.NS_ERROR_NOT_IMPLEMENTED;
       },
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
     };
   },
 
   /**
    * Defines a non-writable property on an object.
    */
   defineConstant: function XPCOMUtils__defineConstant(aObj, aName, aValue) {
     Object.defineProperty(aObj, aName, {
       value: aValue,
       enumerable: true,
       writable: false
     });
   },
 };
 
-var XPCU_lazyPreferenceObserverQI = XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]);
+var XPCU_lazyPreferenceObserverQI = ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]);
 
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(XPCOMUtils, "categoryManager",
                                    "@mozilla.org/categorymanager;1",
                                    "nsICategoryManager");
--- a/js/xpconnect/tests/chrome/test_bug799348.xul
+++ b/js/xpconnect/tests/chrome/test_bug799348.xul
@@ -18,17 +18,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript">
   <![CDATA[
   /** Test for Bug 799348 **/
   SimpleTest.waitForExplicitFinish();
   ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
   ChromeUtils.import("resource://gre/modules/Services.jsm");
   gCalledOnload = false;
   var myObserver = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
     observe: function(win, topic, data) {
       if (topic == "domwindowopened") {
         ok(!gCalledOnload, "domwindowopened notification fired before onload");
         win.addEventListener("load", function(evt) {
           gCalledOnload = true;
           win.close();
         }, false);
       } else if (topic == "domwindowclosed") {
--- a/js/xpconnect/tests/chrome/test_nsScriptErrorWithStack.html
+++ b/js/xpconnect/tests/chrome/test_nsScriptErrorWithStack.html
@@ -17,17 +17,17 @@
   function failingStack() {
     nestedFunction();
   }
   function nestedFunction() {
     doesntExistsAndThrow();
   }
 
   var TestObserver = {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
     observe: function test_observe(aSubject)
     {
       if (!(aSubject instanceof Ci.nsIScriptError)) {
         return;
       }
       dump("stack: "+aSubject.stack+"\n");
 
--- a/js/xpconnect/tests/components/js/xpctest_attributes.js
+++ b/js/xpconnect/tests/components/js/xpctest_attributes.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function TestObjectReadWrite() {}
 TestObjectReadWrite.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestObjectReadWrite"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestObjectReadWrite"]]),
   contractID: "@mozilla.org/js/xpc/test/js/ObjectReadWrite;1",
   classID: Components.ID("{8ff41d9c-66e9-4453-924a-7d8de0a5e966}"),
 
   /* nsIXPCTestObjectReadWrite */
   stringProperty: "XPConnect Read-Writable String",
   booleanProperty: true,
   shortProperty: 32767,
   longProperty: 2147483647,
@@ -23,17 +23,17 @@ TestObjectReadWrite.prototype = {
   timeProperty: -1
 };
 
 
 function TestObjectReadOnly() {}
 TestObjectReadOnly.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestObjectReadOnly"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestObjectReadOnly"]]),
   contractID: "@mozilla.org/js/xpc/test/js/ObjectReadOnly;1",
   classID: Components.ID("{916c4247-253d-4ed0-a425-adfedf53ecc8}"),
 
   /* nsIXPCTestObjectReadOnly */
   strReadOnly: "XPConnect Read-Only String",
   boolReadOnly: true,
   shortReadOnly: 32767,
   longReadOnly: 2147483647,
--- a/js/xpconnect/tests/components/js/xpctest_bug809674.js
+++ b/js/xpconnect/tests/components/js/xpctest_bug809674.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function TestBug809674() {}
 TestBug809674.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestBug809674"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestBug809674"]]),
   contractID: "@mozilla.org/js/xpc/test/js/Bug809674;1",
   classID: Components.ID("{2df46559-da21-49bf-b863-0d7b7bbcbc73}"),
 
   /* nsIXPCTestBug809674 */
   jsvalProperty: {},
 };
 
 
--- a/js/xpconnect/tests/components/js/xpctest_interfaces.js
+++ b/js/xpconnect/tests/components/js/xpctest_interfaces.js
@@ -2,43 +2,43 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function TestInterfaceA() {}
 TestInterfaceA.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestInterfaceA"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestInterfaceA"]]),
   contractID: "@mozilla.org/js/xpc/test/js/TestInterfaceA;1",
   classID: Components.ID("{3c8fd2f5-970c-42c6-b5dd-cda1c16dcfd8}"),
 
   /* nsIXPCTestInterfaceA */
   name: "TestInterfaceADefaultName"
 };
 
 function TestInterfaceB() {}
 TestInterfaceB.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestInterfaceB"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestInterfaceB"]]),
   contractID: "@mozilla.org/js/xpc/test/js/TestInterfaceB;1",
   classID: Components.ID("{ff528c3a-2410-46de-acaa-449aa6403a33}"),
 
   /* nsIXPCTestInterfaceA */
   name: "TestInterfaceADefaultName"
 };
 
 function TestInterfaceAll() {}
 TestInterfaceAll.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestInterfaceA"],
-                                         Ci["nsIXPCTestInterfaceB"],
-                                         Ci["nsIXPCTestInterfaceC"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestInterfaceA"],
+                                          Ci["nsIXPCTestInterfaceB"],
+                                          Ci["nsIXPCTestInterfaceC"]]),
   contractID: "@mozilla.org/js/xpc/test/js/TestInterfaceAll;1",
   classID: Components.ID("{90ec5c9e-f6da-406b-9a38-14d00f59db76}"),
 
   /* nsIXPCTestInterfaceA / nsIXPCTestInterfaceB */
   name: "TestInterfaceAllDefaultName",
 
   /* nsIXPCTestInterfaceC */
   someInteger: 42
--- a/js/xpconnect/tests/components/js/xpctest_params.js
+++ b/js/xpconnect/tests/components/js/xpctest_params.js
@@ -35,17 +35,17 @@ function f_size_and_iid(aSize, aIID, a, 
 
     // Now that we've reduced the problem to one dependent variable, use f_is.
     return f_is(aSize, a, bSize, b, rvSize);
 }
 
 TestParams.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestParams"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestParams"]]),
   contractID: "@mozilla.org/js/xpc/test/js/Params;1",
   classID: Components.ID("{e3b86f4e-49c0-487c-a2b0-3a986720a044}"),
 
   /* nsIXPCTestParams */
   testBoolean: f,
   testOctet: f,
   testShort: f,
   testLong: f,
--- a/js/xpconnect/tests/components/js/xpctest_returncode_child.js
+++ b/js/xpconnect/tests/components/js/xpctest_returncode_child.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function TestReturnCodeChild() {}
 TestReturnCodeChild.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestReturnCodeChild"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestReturnCodeChild"]]),
   contractID: "@mozilla.org/js/xpc/test/js/ReturnCodeChild;1",
   classID: Components.ID("{38dd78aa-467f-4fad-8dcf-4383a743e235}"),
 
   doIt(behaviour) {
     switch (behaviour) {
       case Ci.nsIXPCTestReturnCodeChild.CHILD_SHOULD_THROW:
         throw(new Error("a requested error"));
       case Ci.nsIXPCTestReturnCodeChild.CHILD_SHOULD_RETURN_SUCCESS:
--- a/js/xpconnect/tests/components/js/xpctest_utils.js
+++ b/js/xpconnect/tests/components/js/xpctest_utils.js
@@ -3,15 +3,15 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function TestUtils() {}
 TestUtils.prototype = {
 
   /* Boilerplate */
-  QueryInterface: XPCOMUtils.generateQI([Ci["nsIXPCTestUtils"]]),
+  QueryInterface: ChromeUtils.generateQI([Ci["nsIXPCTestUtils"]]),
   contractID: "@mozilla.org/js/xpc/test/js/TestUtils;1",
   classID: Components.ID("{e86573c4-a384-441a-8c92-7b99e8575b28}"),
   doubleWrapFunction(fun) { return fun }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestUtils]);
--- a/js/xpconnect/tests/unit/component-blob.js
+++ b/js/xpconnect/tests/unit/component-blob.js
@@ -65,13 +65,13 @@ BlobComponent.prototype =
     return interfaces;
   },
 
   getScriptableHelper: function getScriptableHelper() {
     return null;
   },
 
   // nsISupports
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIClassInfo])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIClassInfo])
 };
 
 var gComponentsArray = [BlobComponent];
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(gComponentsArray);
--- a/js/xpconnect/tests/unit/component-file.js
+++ b/js/xpconnect/tests/unit/component-file.js
@@ -96,13 +96,13 @@ FileComponent.prototype =
     return interfaces;
   },
 
   getScriptableHelper: function getScriptableHelper() {
     return null;
   },
 
   // nsISupports
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIClassInfo])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIClassInfo])
 };
 
 var gComponentsArray = [FileComponent];
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(gComponentsArray);
--- a/js/xpconnect/tests/unit/component_import.js
+++ b/js/xpconnect/tests/unit/component_import.js
@@ -66,17 +66,17 @@ BarComponent.prototype =
     return interfaces;
   },
 
   getScriptableHelper: function getScriptableHelper() {
     return null;
   },
 
   // nsISupports
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIClassInfo])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIClassInfo])
 };
 
 const Assert = {
   ok(cond, text) {
     // we don't have the test harness' utilities in this scope, so we need this
     // little helper. In the failure case, the exception is propagated to the
     // caller in the main run_test() function, and the test fails.
     if (!cond)
--- a/js/xpconnect/tests/unit/test_xpcomutils.js
+++ b/js/xpconnect/tests/unit/test_xpcomutils.js
@@ -12,17 +12,17 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Tests
 
 add_test(function test_generateQI_string_names()
 {
     var x = {
-        QueryInterface: XPCOMUtils.generateQI([
+        QueryInterface: ChromeUtils.generateQI([
             Ci.nsIClassInfo,
             "nsIObserver"
         ])
     };
 
     try {
         x.QueryInterface(Ci.nsIClassInfo);
     } catch(e) {
@@ -42,17 +42,17 @@ add_test(function test_generateQI_string
 
 
 add_test(function test_generateCI()
 {
     const classID = Components.ID("562dae2e-7cff-432b-995b-3d4c03fa2b89");
     const classDescription = "generateCI test component";
     const flags = Ci.nsIClassInfo.DOM_OBJECT;
     var x = {
-        QueryInterface: XPCOMUtils.generateQI([]),
+        QueryInterface: ChromeUtils.generateQI([]),
         classInfo: XPCOMUtils.generateCI({classID: classID,
                                           interfaces: [],
                                           flags: flags,
                                           classDescription: classDescription})
     };
 
     try {
         var ci = x.QueryInterface(Ci.nsIClassInfo);
@@ -217,17 +217,17 @@ add_test(function test_generateSingleton
 {
   const XPCCOMPONENT_CONTRACTID = "@mozilla.org/singletonComponentTest;1";
   const XPCCOMPONENT_CID = Components.ID("{31031c36-5e29-4dd9-9045-333a5d719a3e}");
 
   function XPCComponent() {}
   XPCComponent.prototype = {
     classID: XPCCOMPONENT_CID,
     _xpcom_factory: XPCOMUtils.generateSingletonFactory(XPCComponent),
-    QueryInterface: XPCOMUtils.generateQI([])
+    QueryInterface: ChromeUtils.generateQI([])
   };
   let NSGetFactory = XPCOMUtils.generateNSGetFactory([XPCComponent]);
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
   registrar.registerFactory(
     XPCCOMPONENT_CID,
     "XPCComponent",
     XPCCOMPONENT_CONTRACTID,
     NSGetFactory(XPCCOMPONENT_CID)
--- a/layout/tools/recording/recording-cmdline.js
+++ b/layout/tools/recording/recording-cmdline.js
@@ -12,17 +12,17 @@ const nsISupportsString              = C
 const nsIWindowWatcher               = Ci.nsIWindowWatcher;
 
 function RecordingCmdLineHandler() {}
 RecordingCmdLineHandler.prototype =
 {
     classID: Components.ID('{86FB70EC-90FF-45AD-A1C1-F77D3C1184E9}'),
 
     /* nsISupports */
-    QueryInterface: XPCOMUtils.generateQI([nsICommandLineHandler]),
+    QueryInterface: ChromeUtils.generateQI([nsICommandLineHandler]),
 
     /* nsICommandLineHandler */
     handle : function handler_handle(cmdLine) {
         var args = { };
         args.wrappedJSObject = args;
         try {
             var uristr = cmdLine.handleFlagWithParam("recording", false);
             if (uristr == null)
--- a/mobile/android/chrome/content/aboutAccounts.js
+++ b/mobile/android/chrome/content/aboutAccounts.js
@@ -107,19 +107,17 @@ var wrapper = {
   retry: function() {
     deferTransitionToRemoteAfterLoaded();
 
     let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
   },
 
   iframeListener: {
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                         Ci.nsISupportsWeakReference,
-                                         Ci.nsISupports]),
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]),
 
     onStateChange: function(aWebProgress, aRequest, aState, aStatus) {
       let failure = false;
 
       // Captive portals sometimes redirect users
       if ((aState & Ci.nsIWebProgressListener.STATE_REDIRECTING)) {
         failure = true;
       } else if ((aState & Ci.nsIWebProgressListener.STATE_STOP)) {
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3436,17 +3436,17 @@ var DesktopUserAgent = {
   },
 };
 
 
 function nsBrowserAccess() {
 }
 
 nsBrowserAccess.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIBrowserDOMWindow]),
 
   _getBrowser: function _getBrowser(aURI, aOpener, aWhere, aFlags, aTriggeringPrincipal) {
     let isExternal = !!(aFlags & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
     if (isExternal && aURI && aURI.schemeIs("chrome"))
       return null;
 
     let loadflags = isExternal ?
                       Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
@@ -4798,17 +4798,17 @@ Tab.prototype = {
 
   // nsIBrowserTab
   get window() {
     if (!this.browser)
       return null;
     return this.browser.contentWindow;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIWebProgressListener,
     Ci.nsISHistoryListener,
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
     Ci.nsIBrowserTab
   ])
 };
 
--- a/mobile/android/components/AboutRedirector.js
+++ b/mobile/android/components/AboutRedirector.js
@@ -66,17 +66,17 @@ var modules = {
   accounts: {
     uri: "chrome://browser/content/aboutAccounts.xhtml",
     privileged: true
   },
 };
 
 function AboutRedirector() {}
 AboutRedirector.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAboutModule]),
   classID: Components.ID("{322ba47e-7047-4f71-aebf-cb7d69325cd9}"),
 
   _getModuleInfo: function(aURI) {
     let moduleName = aURI.pathQueryRef.replace(/[?#].*/, "").toLowerCase();
     return modules[moduleName];
   },
 
   // nsIAboutModule
--- a/mobile/android/components/AddonUpdateService.js
+++ b/mobile/android/components/AddonUpdateService.js
@@ -26,17 +26,17 @@ const PREF_ADDON_UPDATE_INTERVAL = "exte
 var gNeedsRestart = false;
 
 function AddonUpdateService() {}
 
 AddonUpdateService.prototype = {
   classDescription: "Add-on auto-update management",
   classID: Components.ID("{93c8824c-9b87-45ae-bc90-5b82a1e4d877}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsITimerCallback]),
 
   notify: function aus_notify(aTimer) {
     if (aTimer && !Services.prefs.getBoolPref(PREF_ADDON_UPDATE_ENABLED, true))
       return;
 
     // If we already auto-upgraded and installed new versions, ignore this check
     if (gNeedsRestart)
       return;
--- a/mobile/android/components/BlocklistPrompt.js
+++ b/mobile/android/components/BlocklistPrompt.js
@@ -46,12 +46,12 @@ BlocklistPrompt.prototype = {
     for (let i = 0; i < aAddons.length; i++) {
       if (aAddons[i].item instanceof Ci.nsIPluginTag)
         aAddons[i].item.disabled = true;
       else
         aAddons[i].item.userDisabled = true;
     }
   },
   classID: Components.ID("{4e6ea350-b09a-11df-94e2-0800200c9a66}"),
-  QueryInterface: XPCOMUtils.generateQI([])
+  QueryInterface: ChromeUtils.generateQI([])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([BlocklistPrompt]);
--- a/mobile/android/components/BrowserCLH.js
+++ b/mobile/android/components/BrowserCLH.js
@@ -67,17 +67,17 @@ BrowserCLH.prototype = {
         GeckoViewUtils.addLazyGetter(this, "InputWidgetHelper", {
           module: "resource://gre/modules/InputWidgetHelper.jsm",
         });
 
         GeckoViewUtils.addLazyGetter(this, "FormAssistant", {
           module: "resource://gre/modules/FormAssistant.jsm",
         });
         Services.obs.addObserver({
-          QueryInterface: XPCOMUtils.generateQI([
+          QueryInterface: ChromeUtils.generateQI([
             Ci.nsIObserver, Ci.nsIFormSubmitObserver,
           ]),
           notifyInvalidSubmit: (form, element) => {
             this.FormAssistant.notifyInvalidSubmit(form, element);
           },
         }, "invalidformsubmit");
 
         GeckoViewUtils.addLazyGetter(this, "LoginManagerParent", {
@@ -207,16 +207,16 @@ BrowserCLH.prototype = {
       // XXXbz what about non-HTML documents??
       if (ChromeUtils.getClassName(event.target) == "HTMLDocument") {
         this.LoginManagerContent.onPageShow(event, event.target.defaultView.top);
       }
     }, options);
   },
 
   // QI
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
   // XPCOMUtils factory
   classID: Components.ID("{be623d20-d305-11de-8a39-0800200c9a66}")
 };
 
 var components = [ BrowserCLH ];
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mobile/android/components/ColorPicker.js
+++ b/mobile/android/components/ColorPicker.js
@@ -43,12 +43,12 @@ ColorPicker.prototype = {
       if (data.button == 0)
         aCallback.done(data.color0);
       else
         aCallback.done(this._initial);
     });
   },
 
   classID: Components.ID("{430b987f-bb9f-46a3-99a5-241749220b29}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIColorPicker])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIColorPicker])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ColorPicker]);
--- a/mobile/android/components/ContentDispatchChooser.js
+++ b/mobile/android/components/ContentDispatchChooser.js
@@ -7,17 +7,17 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/Messaging.jsm");
 
 function ContentDispatchChooser() {}
 
 ContentDispatchChooser.prototype =
 {
   classID: Components.ID("5a072a22-1e66-4100-afc1-07aed8b62fc5"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentDispatchChooser]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIContentDispatchChooser]),
 
   get protoSvc() {
     if (!this._protoSvc) {
       this._protoSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"].getService(Ci.nsIExternalProtocolService);
     }
     return this._protoSvc;
   },
 
--- a/mobile/android/components/ContentPermissionPrompt.js
+++ b/mobile/android/components/ContentPermissionPrompt.js
@@ -23,17 +23,17 @@ const PROMPT_FOR_UNKNOWN = [
   "geolocation",
 ];
 
 function ContentPermissionPrompt() {}
 
 ContentPermissionPrompt.prototype = {
   classID: Components.ID("{C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}"),