Bug 1457713 - Port bug 1456035: Change XPCOMUtils.generateQI to ChromeUtils.generateQI in mailnews. r=aceman
authorJorg K <jorgk@jorgk.com>
Mon, 21 May 2018 00:59:53 +0200
changeset 23963 148c2d27abc3daa72f3cb3c3e2f8404e2f018f48
parent 23962 bf2c27b81cae41c86ad9a4b74e7e700f6c8beb7d
child 23964 96fab4a2b81189101231b12106823748c9a70a94
push id14449
push usermozilla@jorgk.com
push dateSun, 20 May 2018 23:01:17 +0000
treeherdercomm-central@148c2d27abc3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1457713, 1456035
Bug 1457713 - Port bug 1456035: Change XPCOMUtils.generateQI to ChromeUtils.generateQI in mailnews. r=aceman
mailnews/addrbook/content/abDragDrop.js
mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
mailnews/addrbook/src/nsAbAutoCompleteSearch.js
mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
mailnews/base/search/src/nsMsgTraitService.js
mailnews/base/src/folderLookupService.js
mailnews/base/src/msgAsyncPrompter.js
mailnews/base/src/msgOAuth2Module.js
mailnews/base/src/newMailNotificationService.js
mailnews/base/src/nsMailNewsCommandLineHandler.js
mailnews/base/test/unit/test_compactFailure.js
mailnews/base/test/unit/test_jsTreeSelection.js
mailnews/base/test/unit/test_junkingWhenDisabled.js
mailnews/base/test/unit/test_nsMsgMailSession_Alerts.js
mailnews/base/test/unit/test_searchChaining.js
mailnews/base/util/OAuth2.jsm
mailnews/base/util/jsTreeSelection.js
mailnews/compose/src/nsSMTPProtocolHandler.js
mailnews/db/gloda/components/glautocomp.js
mailnews/db/gloda/components/jsmimeemitter.js
mailnews/db/gloda/modules/mimemsg.js
mailnews/extensions/dsn/src/dsn-service.js
mailnews/extensions/mdn/src/mdn-service.js
mailnews/extensions/newsblog/js/newsblog.js
mailnews/extensions/smime/src/smime-service.js
mailnews/imap/test/unit/test_cacheParts.js
mailnews/imap/test/unit/test_chunkLastLF.js
mailnews/imap/test/unit/test_dod.js
mailnews/imap/test/unit/test_gmailOfflineMsgStore.js
mailnews/imap/test/unit/test_imapHdrChunking.js
mailnews/imap/test/unit/test_imapHdrStreaming.js
mailnews/imap/test/unit/test_imapStoreMsgOffline.js
mailnews/import/test/unit/resources/TestMailImporter.js
mailnews/import/test/unit/resources/mock_windows_reg_factory.js
mailnews/jsaccount/modules/JSAccountUtils.jsm
mailnews/jsaccount/modules/JaBaseUrl.jsm
mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServer.jsm
mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolder.jsm
mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js
mailnews/local/test/unit/test_over2GBMailboxes.js
mailnews/local/test/unit/test_pop3Download.js
mailnews/local/test/unit/test_streamHeaders.js
mailnews/mime/src/mimeJSComponents.js
mailnews/mime/src/mimeParser.jsm
mailnews/mime/test/unit/test_attachment_size.js
mailnews/mime/test/unit/test_badContentType.js
mailnews/mime/test/unit/test_hidden_attachments.js
mailnews/mime/test/unit/test_message_attachment.js
mailnews/mime/test/unit/test_mimeStreaming.js
mailnews/mime/test/unit/test_rfc822_body.js
mailnews/mime/test/unit/test_text_attachment.js
mailnews/news/src/nsNewsAutoCompleteSearch.js
mailnews/news/test/unit/head_server_setup.js
mailnews/news/test/unit/test_bug540288.js
mailnews/news/test/unit/test_bug695309.js
mailnews/news/test/unit/test_getNewsMessage.js
mailnews/news/test/unit/test_internalUris.js
mailnews/test/resources/MockFactory.js
mailnews/test/resources/NetworkTestUtils.jsm
mailnews/test/resources/PromiseTestUtils.jsm
mailnews/test/resources/alertTestUtils.js
mailnews/test/resources/mailTestUtils.js
--- a/mailnews/addrbook/content/abDragDrop.js
+++ b/mailnews/addrbook/content/abDragDrop.js
@@ -9,17 +9,17 @@ ChromeUtils.import("resource://gre/modul
 // Returns the load context for the current window
 function getLoadContext() {
   return window.QueryInterface(Ci.nsIInterfaceRequestor)
                .getInterface(Ci.nsIWebNavigation)
                .QueryInterface(Ci.nsILoadContext);
 }
 
 var abFlavorDataProvider = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFlavorDataProvider]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFlavorDataProvider]),
 
   getFlavorData: function(aTransferable, aFlavor, aData, aDataLen)
   {
     if (aFlavor == "application/x-moz-file-promise")
     {
       var primitive = {};
       aTransferable.getTransferData("text/vcard", primitive, {});
       var vCard = primitive.value.QueryInterface(Ci.nsISupportsString).data;
--- a/mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
+++ b/mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
@@ -4,17 +4,17 @@
 
 ChromeUtils.import("resource:///modules/mailServices.js");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function nsAbAutoCompleteMyDomain() {}
 
 nsAbAutoCompleteMyDomain.prototype = {
   classID: Components.ID("{5b259db2-e451-4de9-8a6f-cfba91402973}"),
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
       Ci.nsIAutoCompleteSearch]),
 
   cachedIdKey: "",
   cachedIdentity: null,
 
   applicableHeaders: new Set(["addr_to", "addr_cc", "addr_bcc", "addr_reply"]),
 
   startSearch: function(aString, aSearchParam, aResult, aListener) {
--- a/mailnews/addrbook/src/nsAbAutoCompleteSearch.js
+++ b/mailnews/addrbook/src/nsAbAutoCompleteSearch.js
@@ -72,17 +72,17 @@ nsAbAutoCompleteResult.prototype = {
   },
 
   getEmailToUse: function getEmailToUse(aIndex) {
     return this._searchResults[aIndex].emailToUse;
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([ACR, nsIAbAutoCompleteResult])
+  QueryInterface: ChromeUtils.generateQI([ACR, nsIAbAutoCompleteResult])
 }
 
 function nsAbAutoCompleteSearch() {}
 
 nsAbAutoCompleteSearch.prototype = {
   // For component registration
   classID: Components.ID("2f946df9-114c-41fe-8899-81f10daf4f0c"),
 
@@ -451,15 +451,15 @@ nsAbAutoCompleteSearch.prototype = {
     aListener.onSearchResult(this, result);
   },
 
   stopSearch: function stopSearch() {
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteSearch])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch])
 };
 
 // Module
 
 var components = [nsAbAutoCompleteSearch];
 var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
+++ b/mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
@@ -69,17 +69,17 @@ nsAbLDAPAutoCompleteResult.prototype = {
   // nsIAbAutoCompleteResult
 
   getCardAt: function getCardAt(aIndex) {
     return this._searchResults[aIndex].card;
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([ACR, nsIAbAutoCompleteResult])
+  QueryInterface: ChromeUtils.generateQI([ACR, nsIAbAutoCompleteResult])
 }
 
 function nsAbLDAPAutoCompleteSearch() {
   Services.obs.addObserver(this, "quit-application");
   this._timer = Cc["@mozilla.org/timer;1"]
                   .createInstance(Ci.nsITimer);
 }
 
@@ -308,16 +308,16 @@ nsAbLDAPAutoCompleteSearch.prototype = {
       this._result.searchResult = ACR.RESULT_NOMATCH_ONGOING;
 
     this._listener.onSearchResult(this, this._result);
     */
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsIAutoCompleteSearch,
-                                         Ci.nsIAbDirSearchListener])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
+                                          Ci.nsIAutoCompleteSearch,
+                                          Ci.nsIAbDirSearchListener])
 };
 
 // Module
 
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsAbLDAPAutoCompleteSearch]);
--- a/mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
+++ b/mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
@@ -72,17 +72,17 @@ nsAbAutoCompleteResult.prototype = {
 
   getEmailToUse: function getEmailToUse(aIndex) {
     // For this test we can just use the primary email here.
     return this._searchResults[aIndex].card.primaryEmail;
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([ACR, nsIAbAutoCompleteResult])
+  QueryInterface: ChromeUtils.generateQI([ACR, nsIAbAutoCompleteResult])
 }
 
 function createCard(chars, popularity) {
   var card = Cc["@mozilla.org/addressbook/cardproperty;1"]
                .createInstance(Ci.nsIAbCard);
 
   card.firstName = "firstName".slice(0, chars);
   card.lastName = "lastName".slice(0, chars);
--- a/mailnews/base/search/src/nsMsgTraitService.js
+++ b/mailnews/base/search/src/nsMsgTraitService.js
@@ -25,18 +25,17 @@ function _registerTrait(aId, aIndex)
 
 function nsMsgTraitService() {}
 
 nsMsgTraitService.prototype =
 {
   // Component setup
   classID: Components.ID("{A2E95F4F-DA72-4a41-9493-661AD353C00A}"),
 
-  QueryInterface: XPCOMUtils.generateQI([
-      Ci.nsIMsgTraitService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgTraitService]),
 
   // nsIMsgTraitService implementation
 
   get lastIndex()
   {
     return _lastIndex;
   },
 
--- a/mailnews/base/src/folderLookupService.js
+++ b/mailnews/base/src/folderLookupService.js
@@ -33,17 +33,17 @@ var gCreated = false;
 function folderLookupService() {
   if (gCreated)
     throw Cr.NS_ERROR_ALREADY_INITIALIZED;
   this._map = new Map();
   gCreated = true;
 }
 folderLookupService.prototype = {
   // XPCOM registration stuff
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFolderLookupService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFolderLookupService]),
   classID: Components.ID("{a30be08c-afc8-4fed-9af7-79778a23db23}"),
 
   // nsIFolderLookupService impl
   getFolderForURL: function (aUrl) {
     let folder = null;
     // First, see if the folder is in our cache.
     if (this._map.has(aUrl)) {
       let valid = false;
--- a/mailnews/base/src/msgAsyncPrompter.js
+++ b/mailnews/base/src/msgAsyncPrompter.js
@@ -59,17 +59,17 @@ function msgAsyncPrompter() {
   //   Fatal/Error/Warn/Info/Config/Debug/Trace/All
   this._log = Log4Moz.getConfiguredLogger("msgAsyncPrompter",
                                           Log4Moz.Level.Warn,
                                           Log4Moz.Level.Warn);
 }
 
 msgAsyncPrompter.prototype = {
   classID: Components.ID("{49b04761-23dd-45d7-903d-619418a4d319}"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgAsyncPrompter]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAsyncPrompter]),
 
   _pendingPrompts: null,
   _asyncPromptInProgress: 0,
   _log: null,
 
   queueAsyncAuthPrompt: function(aKey, aJumpQueue, aCaller) {
     if (aKey in this._pendingPrompts) {
       this._log.debug("Prompt bound to an existing one in the queue, key: " + aKey);
--- a/mailnews/base/src/msgOAuth2Module.js
+++ b/mailnews/base/src/msgOAuth2Module.js
@@ -10,17 +10,17 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function OAuth2Module() {
   this._refreshToken = '';
 }
 OAuth2Module.prototype = {
   // XPCOM registration stuff
-  QueryInterface: XPCOMUtils.generateQI([Ci.msgIOAuth2Module]),
+  QueryInterface: ChromeUtils.generateQI([Ci.msgIOAuth2Module]),
   classID: Components.ID("{b63d8e4c-bf60-439b-be0e-7c9f67291042}"),
 
   _loadOAuthClientDetails(aIssuer) {
     let details = OAuth2Providers.getIssuerDetails(aIssuer);
     if (details)
       [this._appKey, this._appSecret, this._authURI, this._tokenURI] = details;
     else
       throw Cr.NS_ERROR_INVALID_ARGUMENT;
--- a/mailnews/base/src/newMailNotificationService.js
+++ b/mailnews/base/src/newMailNotificationService.js
@@ -52,17 +52,19 @@ function NewMailNotificationService() {
   // Listen for mail-startup-done to do the rest of our setup after folders are initialized
   Services.obs.addObserver(this, "mail-startup-done");
 }
 
 NewMailNotificationService.prototype = {
   classDescription: "Maintain counts of new and unread messages",
   classID:              Components.ID("{740880E6-E299-4165-B82F-DF1DCAB3AE22}"),
   contractID:           "@mozilla.org/newMailNotificationService;1",
-  QueryInterface:       XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsIFolderListener, Ci.mozINewMailNotificationService]),
+  QueryInterface:       ChromeUtils.generateQI([Ci.nsIObserver,
+                                                Ci.nsIFolderListener,
+                                                Ci.mozINewMailNotificationService]),
   _xpcom_factory: XPCOMUtils.generateSingletonFactory(NewMailNotificationService),
 
   _mUnreadCount: 0,
   _mNewCount: 0,
   _listeners: null,
   _log: null,
 
   get countNew() {
--- a/mailnews/base/src/nsMailNewsCommandLineHandler.js
+++ b/mailnews/base/src/nsMailNewsCommandLineHandler.js
@@ -142,25 +142,25 @@ var nsMailNewsCommandLineHandler =
   /* nsIFactory */
   createInstance: function(outer, iid) {
     if (outer != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
 
     return this.QueryInterface(iid);
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler,
-                                         Ci.nsIFactory])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLineHandler,
+                                          Ci.nsIFactory])
 };
 
 function mailNewsCommandLineHandlerModule() {}
 mailNewsCommandLineHandlerModule.prototype =
 {
   // XPCOM registration
   classID: CMDLINEHANDLER_CID,
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIModule]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIModule]),
 
   _xpcom_factory: nsMailNewsCommandLineHandler
 };
 
 var components = [mailNewsCommandLineHandlerModule];
 var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mailnews/base/test/unit/test_compactFailure.js
+++ b/mailnews/base/test/unit/test_compactFailure.js
@@ -15,25 +15,25 @@ var gUuid;
 // Allow certain xpcom errors.
 logHelperAllowedErrors.push(Cr.NS_ERROR_FILE_IS_LOCKED);
 logHelperAllowedErrors.push(Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST);
 
 function LockedFileOutputStream() {
 }
 
 LockedFileOutputStream.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFileOutputStream]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIFileOutputStream]),
 
   init: function(file, ioFlags, perm, behaviorFlags) {
     throw Cr.NS_ERROR_FILE_IS_LOCKED;
   },
 }
 
 var MsgDBServiceFailure = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgDBService]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgDBService]),
 
   openMailDBFromFile: function(file, folder, create, leaveInvalidDB) {
     if (folder.name == "ShouldFail")
       throw Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST;
     return this._genuine.openMailDBFromFile(file, folder, create, leaveInvalidDB);
   },
 
   openFolderDB: function(folder, leaveInvalidDB) {
--- a/mailnews/base/test/unit/test_jsTreeSelection.js
+++ b/mailnews/base/test/unit/test_jsTreeSelection.js
@@ -4,17 +4,17 @@
 
 ChromeUtils.import("resource:///modules/jsTreeSelection.js");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var fakeView = {
   rowCount: 101,
   selectionChanged: function() {
   },
-  QueryInterface: XPCOMUtils.generateQI(
+  QueryInterface: ChromeUtils.generateQI(
     [Ci.nsITreeView]),
 };
 
 var sel = new JSTreeSelection(null);
 sel.view = fakeView;
 
 function bad_ranges(aMsg, aExpected) {
   let s = "\x1b[1;31m!!! BAD RANGES: " + aMsg + "\n";
--- a/mailnews/base/test/unit/test_junkingWhenDisabled.js
+++ b/mailnews/base/test/unit/test_junkingWhenDisabled.js
@@ -22,17 +22,17 @@ var nsIMFNService = Ci.nsIMsgFolderNotif
 // Warning: these are partial implementations. If someone adds additional
 // calls to these objects in nsMsgDBView and friends, it will also
 // be necessary to add fake versions of those calls here.
 
 var gFakeView = {
   rowCount: 1,
   selectionChanged: function() {
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView]),
 };
 
 var gFakeSelection = new JSTreeSelection(null);
 
 // Items used to add messages to the folder
 
 var gMessageGenerator = new MessageGenerator();
 var gScenarioFactory = new MessageScenarioFactory(gMessageGenerator);
--- a/mailnews/base/test/unit/test_nsMsgMailSession_Alerts.js
+++ b/mailnews/base/test/unit/test_nsMsgMailSession_Alerts.js
@@ -25,27 +25,27 @@ function alert(aDialogTitle, aText) {
   gText = aText;
 }
 
 var msgWindow = {
   get promptDialog() {
     return alertUtilsPrompts;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgWindow])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgWindow])
 };
 
 var msgUrl = {
   _msgWindow: null,
 
   get msgWindow() {
     return this._msgWindow;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgMailNewsUrl])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgMailNewsUrl])
 };
 
 function alertListener() {}
 
 alertListener.prototype = {
   mReturn: false,
   mMessage: null,
   mMsgWindow: null,
--- a/mailnews/base/test/unit/test_searchChaining.js
+++ b/mailnews/base/test/unit/test_searchChaining.js
@@ -57,17 +57,17 @@ async function searchTest()
   //   have to wait before we are done and clear.
   await PromiseTestUtils.promiseDelay(1000);
 }
 
 // nsIMsgSearchNotify implementation
 var searchListener =
 {
   numTotalMessages: 0,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgSearchNotify]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgSearchNotify]),
   onNewSearch: function()
   {
     this.numTotalMessages = 0;
   },
   onSearchHit: function(dbHdr, folder)
   {
     this.numTotalMessages++;
   },
--- a/mailnews/base/util/OAuth2.jsm
+++ b/mailnews/base/util/OAuth2.jsm
@@ -111,18 +111,18 @@ OAuth2.prototype = {
                     return;
                 }
 
                 this._listener = {
                     window: aWindow,
                     webProgress: aWebProgress,
                     _parent: this.account,
 
-                    QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
-                                                           Ci.nsISupportsWeakReference]),
+                    QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
+                                                            Ci.nsISupportsWeakReference]),
 
                     _cleanUp: function() {
                       this.webProgress.removeProgressListener(this);
                       this.window.close();
                       delete this.window;
                     },
 
                     _checkForRedirect: function(aURL) {
--- a/mailnews/base/util/jsTreeSelection.js
+++ b/mailnews/base/util/jsTreeSelection.js
@@ -614,17 +614,17 @@ JSTreeSelection.prototype = {
   },
 
   currentColumn: null,
 
   get shiftSelectPivot() {
     return this._shiftSelectPivot != null ? this._shiftSelectPivot : -1;
   },
 
-  QueryInterface: XPCOMUtils.generateQI(
+  QueryInterface: ChromeUtils.generateQI(
     [Ci.nsITreeSelection]),
 
   /*
    * Functions after this aren't part of the nsITreeSelection interface.
    */
 
   /**
    * Duplicate this selection on another nsITreeSelection. This is useful
--- a/mailnews/compose/src/nsSMTPProtocolHandler.js
+++ b/mailnews/compose/src/nsSMTPProtocolHandler.js
@@ -5,17 +5,17 @@
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var kNetworkProtocolCIDPrefix = "@mozilla.org/network/protocol;1?name=";
 var nsIProtocolHandler = Ci.nsIProtocolHandler;
 
 function makeProtocolHandler(aProtocol, aDefaultPort, aClassID) {
   return {
     classID: Components.ID(aClassID),
-    QueryInterface: XPCOMUtils.generateQI([nsIProtocolHandler]),
+    QueryInterface: ChromeUtils.generateQI([nsIProtocolHandler]),
 
     scheme: aProtocol,
     defaultPort: aDefaultPort,
     protocolFlags: nsIProtocolHandler.URI_NORELATIVE |
                    nsIProtocolHandler.URI_DANGEROUS_TO_LOAD |
       nsIProtocolHandler.URI_NON_PERSISTABLE |
       nsIProtocolHandler.ALLOWS_PROXY |
       nsIProtocolHandler.URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT,
--- a/mailnews/db/gloda/components/glautocomp.js
+++ b/mailnews/db/gloda/components/glautocomp.js
@@ -493,17 +493,17 @@ function nsAutoCompleteGloda() {
     this.completers.push(new MessageTagCompleter());      // not async.
   } catch (e) {
     logException(e);
   }
 }
 
 nsAutoCompleteGloda.prototype = {
   classID: Components.ID("{3bbe4d77-3f70-4252-9500-bc00c26f476d}"),
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
       Ci.nsIAutoCompleteSearch]),
 
   startSearch: function(aString, aParam, aResult, aListener) {
     try {
       let result = new nsAutoCompleteGlodaResult(aListener, this, aString);
       // save this for hacky access to the search.  I somewhat suspect we simply
       //  should not be using the formal autocomplete mechanism at all.
       // Used in glodacomplete.xml.
--- a/mailnews/db/gloda/components/jsmimeemitter.js
+++ b/mailnews/db/gloda/components/jsmimeemitter.js
@@ -65,17 +65,17 @@ function MimeMessageEmitter() {
   this._writeBody = false;
 }
 
 var deathToNewlines = /\n/g;
 
 MimeMessageEmitter.prototype = {
   classID: Components.ID("{8cddbbbc-7ced-46b0-a936-8cddd1928c24}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMimeEmitter]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMimeEmitter]),
 
   initialize: function mime_emitter_initialize(aUrl, aChannel, aFormat) {
     this._url = aUrl;
     this._curPart = new this._mimeMsg.MimeMessage();
     // the partName is intentionally ""!  not a place-holder!
     this._curPart.partName = "";
     this._curAttachment = "";
     this._partMap[""] = this._curPart;
--- a/mailnews/db/gloda/modules/mimemsg.js
+++ b/mailnews/db/gloda/modules/mimemsg.js
@@ -68,17 +68,17 @@ function CallbackStreamListener(aMsgHdr,
   else {
     this._callbacksThis = [aCallbackThis];
     this._callbacks =[aCallback];
   }
   activeStreamListeners[hdrURI] = this;
 }
 
 CallbackStreamListener.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
     this._request = aRequest;
   },
   onStopRequest: function (aRequest, aContext, aStatusCode) {
     let msgURI = this._msgHdr.folder.getUriForMsg(this._msgHdr);
     delete activeStreamListeners[msgURI];
--- a/mailnews/extensions/dsn/src/dsn-service.js
+++ b/mailnews/extensions/dsn/src/dsn-service.js
@@ -11,14 +11,14 @@ DSNService.prototype = {
   name: "dsn",
   chromePackageName: "messenger",
   showPanel: function(server) {
     // don't show the panel for news, rss, or local accounts
     return (server.type != "nntp" && server.type != "rss" &&
             server.type != "none");
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
   classID: Components.ID("{849dab91-9bc9-4508-a0ee-c2453e7c092d}"),
 };
 
 var components = [DSNService];
 var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mailnews/extensions/mdn/src/mdn-service.js
+++ b/mailnews/extensions/mdn/src/mdn-service.js
@@ -11,14 +11,14 @@ MDNService.prototype = {
   name: "mdn",
   chromePackageName: "messenger",
   showPanel: function(server) {
     // don't show the panel for news, rss, im or local accounts
     return (server.type != "nntp" && server.type != "rss" &&
             server.type != "im" && server.type != "none");
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
   classID: Components.ID("{e007d92e-1dd1-11b2-a61e-dc962c9b8571}"),
 };
 
 var components = [MDNService];
 var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mailnews/extensions/newsblog/js/newsblog.js
+++ b/mailnews/extensions/newsblog/js/newsblog.js
@@ -20,29 +20,29 @@ FeedDownloader.prototype = {
 
   classID: Components.ID("{5c124537-adca-4456-b2b5-641ab687d1f6}"),
   classInfo: XPCOMUtils.generateCI({
                classID: "{5c124537-adca-4456-b2b5-641ab687d1f6}",
                contractID: "@mozilla.org/newsblog-feed-downloader;1",
                classDescription: "Feed Downloader",
                interfaces: [Ci.nsINewsBlogFeedDownloader],
                flags: Ci.nsIClassInfo.SINGLETON}),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsINewsBlogFeedDownloader]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsINewsBlogFeedDownloader]),
 };
 
 function FeedAcctMgrExtension() { }
 FeedAcctMgrExtension.prototype = {
   name: "newsblog",
   chromePackageName: "messenger-newsblog",
   showPanel: server => false,
 
   classID: Components.ID("{E109C05F-D304-4ca5-8C44-6DE1BFAF1F74}"),
   classInfo: XPCOMUtils.generateCI({
                classID: "{E109C05F-D304-4ca5-8C44-6DE1BFAF1F74}",
                contractID: "@mozilla.org/accountmanager/extension;1?name=newsblog",
                classDescription: "Feed Account Manager Extension",
                interfaces: [Ci.nsIMsgAccountManagerExtension],
                flags: Ci.nsIClassInfo.SINGLETON}),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
 };
 
 var components = [FeedDownloader, FeedAcctMgrExtension];
 var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mailnews/extensions/smime/src/smime-service.js
+++ b/mailnews/extensions/smime/src/smime-service.js
@@ -11,14 +11,14 @@ SMIMEService.prototype = {
   name: "smime",
   chromePackageName: "messenger",
   showPanel: function(server) {
     // don't show the panel for news, rss, or local accounts
     return (server.type != "nntp" && server.type != "rss" &&
             server.type != "im" && server.type != "none");
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgAccountManagerExtension]),
   classID: Components.ID("{f2809796-1dd1-11b2-8c1b-8f15f007c699}"),
 };
 
 var components = [SMIMEService];
 var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/mailnews/imap/test/unit/test_cacheParts.js
+++ b/mailnews/imap/test/unit/test_cacheParts.js
@@ -25,17 +25,17 @@ var gMsgPartURL2;
 var gUidValidity;
 
 // We use this as a display consumer
 var streamListener =
 {
   _data: "",
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, Cr.NS_OK);
   },
 
--- a/mailnews/imap/test/unit/test_chunkLastLF.js
+++ b/mailnews/imap/test/unit/test_chunkLastLF.js
@@ -112,17 +112,17 @@ function* endTest()
   let thread = gThreadManager.currentThread;
   while (thread.hasPendingEvents())
     thread.processNextEvent(true);
 
   yield true;
 }
 
 var gStreamListener = {
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   _data : null,
   onStartRequest : function (aRequest, aContext) {
     this._data = "";
     this._stream = null;
   },
   onStopRequest : function (aRequest, aContext, aStatusCode) {
     async_driver();
--- a/mailnews/imap/test/unit/test_dod.js
+++ b/mailnews/imap/test/unit/test_dod.js
@@ -99,17 +99,17 @@ function* streamMessages() {
       }
       catch(e){}
     }
   }
   yield true;
 }
 
 var gStreamListener = {
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   _data : null,
   onStartRequest : function (aRequest, aContext) {
     this._data = "";
     this._stream = null;
   },
   onStopRequest : function (aRequest, aContext, aStatusCode) {
     async_driver();
--- a/mailnews/imap/test/unit/test_gmailOfflineMsgStore.js
+++ b/mailnews/imap/test/unit/test_gmailOfflineMsgStore.js
@@ -215,17 +215,17 @@ asyncUrlListener.callback = function(aUr
 };
 
  // We use this as a display consumer
 var streamListener =
 {
   _data: "",
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, 0);
   },
 
@@ -236,17 +236,17 @@ var streamListener =
 
     scriptStream.init(aInputStream);
 
     scriptStream.read(aCount);
   }
 };
 
 var gStreamListener = {
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   _data : null,
   onStartRequest : function (aRequest, aContext) {
     this._data = "";
   },
   onStopRequest : function (aRequest, aContext, aStatusCode) {
     async_driver();
     this._stream = null;
--- a/mailnews/imap/test/unit/test_imapHdrChunking.js
+++ b/mailnews/imap/test/unit/test_imapHdrChunking.js
@@ -17,18 +17,18 @@ ChromeUtils.import("resource:///modules/
 // IMAP pump
 
 setupIMAPPump();
 
 // Dummy message window so we can say the inbox is open in a window.
 var dummyMsgWindow =
 {
   openFolder : IMAPPump.inbox,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgWindow,
-                                         Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgWindow,
+                                          Ci.nsISupportsWeakReference])
 };
 
 var gFolderListener = {
   _gotNewMailBiff: false,
   OnItemIntPropertyChanged : function(aItem, aProperty, aOldValue, aNewValue) {
     if (aProperty == "BiffState" &&
         aNewValue == Ci.nsIMsgFolder.nsMsgBiffState_NewMail) {
       this._gotNewMailBiff = true;
--- a/mailnews/imap/test/unit/test_imapHdrStreaming.js
+++ b/mailnews/imap/test/unit/test_imapHdrStreaming.js
@@ -26,17 +26,17 @@ var gMsgId1 = "200806061706.m56H6RWT0049
 
 // We use this as a display consumer
 var streamListener =
 {
   _data: "",
   _stream : null,
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, 0);
     Assert.ok(this._data.includes("Content-Type"));
     async_driver();
--- a/mailnews/imap/test/unit/test_imapStoreMsgOffline.js
+++ b/mailnews/imap/test/unit/test_imapStoreMsgOffline.js
@@ -34,17 +34,17 @@ var gFirstMsgSize;
 var gImapInboxOfflineStoreSize;
 
 // We use this as a display consumer
 var streamListener =
 {
   _data: "",
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, 0);
   },
 
@@ -210,17 +210,17 @@ var tests = [
   {
     dump("checking offline store size\n");
     Assert.ok(IMAPPump.inbox.filePath.fileSize <= gImapInboxOfflineStoreSize);
   },
   teardown
 ]
 
 var gStreamListener = {
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   _data : null,
   onStartRequest : function (aRequest, aContext) {
     this._data = "";
   },
   onStopRequest : function (aRequest, aContext, aStatusCode) {
     async_driver();
   },
--- a/mailnews/import/test/unit/resources/TestMailImporter.js
+++ b/mailnews/import/test/unit/resources/TestMailImporter.js
@@ -1,18 +1,18 @@
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function TestMailImpoter() {
 };
 
 TestMailImpoter.prototype = {
   classID: Components.ID("{a81438ef-aca1-41a5-9b3a-3ccfbbe4f5e1}"),
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIImportModule,
-                                         Ci.nsIImportMail]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIImportModule,
+                                          Ci.nsIImportMail]),
 
   contractID: "@mozilla.org/import/test;1",
 
   _xpcom_categories: [{
     category: "mailnewsimport",
     entry: "{a81438ef-aca1-41a5-9b3a-3ccfbbe4f5e1}",
     value: "mail"
   }],
--- a/mailnews/import/test/unit/resources/mock_windows_reg_factory.js
+++ b/mailnews/import/test/unit/resources/mock_windows_reg_factory.js
@@ -2,17 +2,17 @@ ChromeUtils.import("resource://testing-c
 
 var gUuid;
 
 function MockWindowsRegKey(registryData) {
   this._registryData = registryData;
 }
 
 MockWindowsRegKey.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowsRegKey]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowsRegKey]),
 
   open: function(aRootKey, aRelPath, aMode) {
     if (!this._registryData[aRelPath])
       throw Cr.NS_ERROR_FAILURE;
     this._keyPath = aRelPath;
   },
 
   close: function() {
--- a/mailnews/jsaccount/modules/JSAccountUtils.jsm
+++ b/mailnews/jsaccount/modules/JSAccountUtils.jsm
@@ -79,17 +79,17 @@ var log = configureLogging();
  *   @param aJsDelegateConstructor: a JS constructor class, called using new,
  *                                  that will create the JS object to which
  *                                  XPCOM methods calls will be delegated.
  */
 
 JSAccountUtils.jaFactory = function (aProperties, aJsDelegateConstructor)
 {
   let factory = {};
-  factory.QueryInterface = XPCOMUtils.generateQI([Ci.nsIFactory]);
+  factory.QueryInterface = ChromeUtils.generateQI([Ci.nsIFactory]);
   factory.lockFactory = function() {};
 
   factory.createInstance = function(outer, iid)
   {
     if (outer != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
 
     // C++ delegator class.
--- a/mailnews/jsaccount/modules/JaBaseUrl.jsm
+++ b/mailnews/jsaccount/modules/JaBaseUrl.jsm
@@ -59,17 +59,17 @@ function JaBaseUrl(aDelegator, aBaseInte
 JaBaseUrl.prototype = {
 // Typical boilerplate to include in all implementations.
   __proto__: JSAccountUtils.makeCppDelegator(JaBaseUrlProperties),
 
   // Flag this item as CPP needs to delegate to JS.
   _JsPrototypeToDelegate: true,
 
   // QI to the interfaces.
-  QueryInterface: XPCOMUtils.generateQI(JaBaseUrlProperties.baseInterfacesQI),
+  QueryInterface: ChromeUtils.generateQI(JaBaseUrlProperties.baseInterfacesQI),
 
   // Used to access an instance as JS, bypassing XPCOM.
   get wrappedJSObject() {
     return this;
   },
 
   // Accessor to the weak cpp delegator.
   get delegator() {
--- a/mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServer.jsm
+++ b/mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServer.jsm
@@ -46,17 +46,17 @@ function JaBaseIncomingServer(aDelegator
 
 JaBaseIncomingServer.prototype = {
   // Typical boilerplate to include in all implementations.
 
   // Flag this item as CPP needs to delegate to JS.
   _JsPrototypeToDelegate: true,
 
   // QI to the (partially implemented only) interfaces.
-  QueryInterface: XPCOMUtils.generateQI(JaBaseIncomingServerProperties.delegateInterfaces),
+  QueryInterface: ChromeUtils.generateQI(JaBaseIncomingServerProperties.delegateInterfaces),
 
   // Used to access an instance as JS, bypassing XPCOM.
   get wrappedJSObject() {
     return this;
   },
 
   // Dynamically-generated list of delegate methods.
   delegateList: null,
--- a/mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolder.jsm
+++ b/mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolder.jsm
@@ -49,17 +49,17 @@ function JaBaseMsgFolder(aDelegator, aBa
 
 JaBaseMsgFolder.prototype = {
   // Typical boilerplate to include in all implementations.
 
   // Flag this item as CPP needs to delegate to JS.
   _JsPrototypeToDelegate: true,
 
   // QI to the (partially implemented only) interfaces.
-  QueryInterface: XPCOMUtils.generateQI(JaBaseMsgFolderProperties.delegateInterfaces),
+  QueryInterface: ChromeUtils.generateQI(JaBaseMsgFolderProperties.delegateInterfaces),
 
   // Used to access an instance as JS, bypassing XPCOM.
   get wrappedJSObject() {
     return this;
   },
 
   // Dynamically-generated list of delegate methods.
   delegateList: null,
--- a/mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js
+++ b/mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js
@@ -46,12 +46,12 @@ testJaMsgProtocolInfo.prototype = {
   get canGetIncomingMessages() { return false; },
   get defaultDoBiff() { return false; },
   get showComposeMsgLink() { return false; },
   get foldersCreatedAsync() { return false; },
 
   classDescription: "testja Msg Protocol Info implementation",
   classID: Components.ID("{74b9b9c3-9594-41c4-b9f0-326e5daac2e0}"),
   contractID: "@mozilla.org/messenger/protocol/info;1?type=testja",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgProtocolInfo])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgProtocolInfo])
 };
 
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([testJaMsgProtocolInfo]);
--- a/mailnews/local/test/unit/test_over2GBMailboxes.js
+++ b/mailnews/local/test/unit/test_over2GBMailboxes.js
@@ -105,17 +105,17 @@ function accessOver2GBMsg()
   let messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
   let msghdr = getMessageHdr();
   let msgURI = msghdr.folder.getUriForMsg(msghdr);
   let msgServ = messenger.messageServiceFromURI(msgURI);
   msgServ.streamMessage(msgURI, gStreamListener, null, null, false, "", true);
 }
 
 var gStreamListener = {
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   _data : null,
   onStartRequest : function (aRequest, aContext) {
     this._data = "";
   },
   onStopRequest : function (aRequest, aContext, aStatusCode) {
     let fstream = Cc["@mozilla.org/network/file-input-stream;1"]
                     .createInstance(Ci.nsIFileInputStream);
--- a/mailnews/local/test/unit/test_pop3Download.js
+++ b/mailnews/local/test/unit/test_pop3Download.js
@@ -51,17 +51,17 @@ function streamNextMessage()
   let messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
   let msghdr = gMsgHdrs[gHdrIndex];
   let msgURI = msghdr.folder.getUriForMsg(msghdr);
   let msgServ = messenger.messageServiceFromURI(msgURI);
   msgServ.streamMessage(msgURI, gStreamListener, null, null, false, "", true);
 }
 
 gStreamListener = {
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface : ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   _data : null,
   onStartRequest : function (aRequest, aContext) {
     this._stream = null;
     this._data = "";
   },
   onStopRequest : function (aRequest, aContext, aStatusCode) {
     // check that the streamed message starts with "From "
--- a/mailnews/local/test/unit/test_streamHeaders.js
+++ b/mailnews/local/test/unit/test_streamHeaders.js
@@ -94,17 +94,17 @@ function badStreaming()
  * that has been read.
  */
 function createStreamListener(k) {
   return {
     _data: "",
     _stream : null,
 
     QueryInterface:
-      XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+      ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
     // nsIRequestObserver
     onStartRequest: function(aRequest, aContext) {
     },
     onStopRequest: function(aRequest, aContext, aStatusCode) {
       k(this._data);
     },
 
--- a/mailnews/mime/src/mimeJSComponents.js
+++ b/mailnews/mime/src/mimeJSComponents.js
@@ -13,17 +13,17 @@ function HeaderHandler() {
   this.deliverEOF = function () {};
 }
 
 function StringEnumerator(iterator) {
   this._iterator = iterator;
   this._next = undefined;
 }
 StringEnumerator.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.nsIUTF8StringEnumerator]),
   _setNext: function () {
     if (this._next !== undefined)
       return;
     this._next = this._iterator.next();
   },
   hasMore: function () {
     this._setNext();
@@ -128,17 +128,17 @@ MimeStructuredHeaders.prototype = {
 
 function MimeHeaders() {
 }
 MimeHeaders.prototype = {
   __proto__: MimeStructuredHeaders.prototype,
   classDescription: "Mime headers implementation",
   classID: Components.ID("d1258011-f391-44fd-992e-c6f4b461a42f"),
   contractID: "@mozilla.org/messenger/mimeheaders;1",
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMimeHeaders,
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMimeHeaders,
     Ci.msgIStructuredHeaders]),
 
   initialize: function MimeHeaders_initialize(allHeaders) {
     this._headers = MimeParser.extractHeaders(allHeaders);
   },
 
   extractHeader: function MimeHeaders_extractHeader(header, getAll) {
     if (!this._headers)
@@ -160,17 +160,17 @@ MimeHeaders.prototype = {
 };
 
 function MimeWritableStructuredHeaders() {
   this._headers = new Map();
 }
 MimeWritableStructuredHeaders.prototype = {
   __proto__: MimeStructuredHeaders.prototype,
   classID: Components.ID("c560806a-425f-4f0f-bf69-397c58c599a7"),
-  QueryInterface: XPCOMUtils.generateQI([
+  QueryInterface: ChromeUtils.generateQI([
     Ci.msgIStructuredHeaders,
     Ci.msgIWritableStructuredHeaders]),
 
   setHeader: function (aHeaderName, aValue) {
     this._headers.set(aHeaderName.toLowerCase(), aValue);
   },
 
   deleteHeader: function (aHeaderName) {
@@ -256,17 +256,17 @@ function fixArray(addresses, preserveGro
     count.value = outputArray.length;
   return outputArray;
 }
 
 function MimeAddressParser() {
 }
 MimeAddressParser.prototype = {
   classID: Components.ID("96bd8769-2d0e-4440-963d-22b97fb3ba77"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgHeaderParser]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgHeaderParser]),
 
   parseEncodedHeader: function (aHeader, aCharset, aPreserveGroups, count) {
     aHeader = aHeader || "";
     let value = MimeParser.parseHeaderField(aHeader,
       MimeParser.HEADER_ADDRESS | MimeParser.HEADER_OPTION_ALL_I18N, aCharset);
     return fixArray(value, aPreserveGroups, count);
   },
   parseDecodedHeader: function (aHeader, aPreserveGroups, count) {
@@ -433,17 +433,17 @@ MimeAddressParser.prototype = {
     return this.makeMimeHeader([object]);
   },
 };
 
 function MimeConverter() {
 }
 MimeConverter.prototype = {
   classID: Components.ID("93f8c049-80ed-4dda-9000-94ad8daba44c"),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMimeConverter]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMimeConverter]),
 
   encodeMimePartIIStr_UTF8: function (aHeader, aStructured, aCharset,
       aFieldNameLen, aLineLength) {
     // The JSMime encoder only works in UTF-8, so if someone requests to not do
     // it, they need to change their code.
     if (aCharset.toLowerCase() != "utf-8") {
       Deprecated.warning("Encoding to non-UTF-8 values is obsolete",
         "http://bugzilla.mozilla.org/show_bug.cgi?id=790855");
--- a/mailnews/mime/src/mimeParser.jsm
+++ b/mailnews/mime/src/mimeParser.jsm
@@ -115,17 +115,17 @@ var MimeParser = {
       onDataAvailable: function SLP_onData(aRequest, aContext, aStream,
                                            aOffset, aCount) {
         var scriptIn = Cc["@mozilla.org/scriptableinputstream;1"]
                          .createInstance(Ci.nsIScriptableInputStream);
         scriptIn.init(aStream);
         // Use readBytes instead of read to handle embedded NULs properly.
         this._parser.deliverData(scriptIn.readBytes(aCount));
       },
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener,
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener,
         Ci.nsIRequestObserver])
     };
     setDefaultParserOptions(opts);
     StreamListener._parser = new jsmime.MimeParser(emitter, opts);
     return StreamListener;
   },
 
   /**
--- a/mailnews/mime/test/unit/test_attachment_size.js
+++ b/mailnews/mime/test/unit/test_attachment_size.js
@@ -193,17 +193,17 @@ var messages = [
                       'X-Mozilla-External-Attachment-URL': 'https://myblog.com/file.mp3',
                     },
                     disposition: 'attachment; name="file.mp3"' }],
     size: 123456789 },
 ];
 
 
 var gStreamListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
     // We reset the size here because we know that we only expect one attachment
     //  per test email. In the case of the attached .eml with nested
     //  attachments, this allows us to properly discard the nested attachment
     //  sizes.
     // msgHdrViewOverlay.js has a stack of attachment infos that properly
--- a/mailnews/mime/test/unit/test_badContentType.js
+++ b/mailnews/mime/test/unit/test_badContentType.js
@@ -41,17 +41,17 @@ var messages = [
                     contentType: '=?windows-1252?q?application/pdf',
                     filename: 'lines.pdf',
                     encoding: 'base64',
                     format: '' }],
     testContentType: "application/pdf" },
 ];
 
 var gStreamListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
     // We reset the size here because we know that we only expect one attachment
     //  per test email
     // msgHdrViewOverlay.js has a stack of attachment infos that properly
     //  handles this.
     gMessageHeaderSink.size = null;
--- a/mailnews/mime/test/unit/test_hidden_attachments.js
+++ b/mailnews/mime/test/unit/test_hidden_attachments.js
@@ -89,17 +89,17 @@ var messages = [
                     contentType: "application/x-ubik",
                     format: "",
                     shouldShow: true }],
   },
 ];
 
 
 var gStreamListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
   },
   onStopRequest: function (aRequest, aContext, aStatusCode) {
     let expectedAttachments = this.allAttachments.filter(i => i.shouldShow).
       map(i => i.filename);
     Assert.equal(expectedAttachments.length,
--- a/mailnews/mime/test/unit/test_message_attachment.js
+++ b/mailnews/mime/test/unit/test_message_attachment.js
@@ -56,17 +56,17 @@ var messages = [
         subject: '=?UTF-8?B?dGVzdFN1YmplY3Q=?=', // This string is 'testSubject'.
         charset: 'UTF-8',
       }),
     ])},
 ];
 
 
 var gStreamListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   index: 0, // The index of the message we're currently looking at.
 
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
     this.contents = "";
     this.stream = null;
   },
--- a/mailnews/mime/test/unit/test_mimeStreaming.js
+++ b/mailnews/mime/test/unit/test_mimeStreaming.js
@@ -52,17 +52,17 @@ function streamMsg(msgHdr)
     gUrlListener,
     true, // have them create the converter
     // additional uri payload, note that "header=" is prepended automatically
     "filter",
     true);
 }
 
 gStreamListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
   _stream : null,
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
   },
   onStopRequest: function (aRequest, aContext, aStatusCode) {
     doNextTest();
   },
 
--- a/mailnews/mime/test/unit/test_rfc822_body.js
+++ b/mailnews/mime/test/unit/test_rfc822_body.js
@@ -31,17 +31,17 @@ var messages = [
                       format: "" }]
     }),
     attachmentCount: inline => inline ? 2 : 1,
   },
 ];
 
 var gStreamListener = {
   stream: null,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
   },
   onStopRequest: function (aRequest, aContext, aStatusCode) {
     Assert.equal(gMessageHeaderSink.attachmentCount,
                  this.expectedAttachmentCount);
     async_driver();
--- a/mailnews/mime/test/unit/test_text_attachment.js
+++ b/mailnews/mime/test/unit/test_text_attachment.js
@@ -27,17 +27,17 @@ var messages = [
   // text attachment
   { attachments: [{ body: textAttachment,
                     filename: 'test.txt',
                     format: '' }]},
   ];
 
 
 var gStreamListener = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   _str:"",
   // nsIRequestObserver part
   onStartRequest: function (aRequest, aContext) {
   },
   onStopRequest: function (aRequest, aContext, aStatusCode) {
     // check that text attachment contents didn't end up inline.
     Assert.ok(!this._str.includes(textAttachment));
--- a/mailnews/news/src/nsNewsAutoCompleteSearch.js
+++ b/mailnews/news/src/nsNewsAutoCompleteSearch.js
@@ -54,17 +54,17 @@ nsNewsAutoCompleteResult.prototype = {
     return this.getValueAt(aIndex);
   },
 
   removeValueAt: function removeValueAt(aRowIndex, aRemoveFromDB) {
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([kACR])
+  QueryInterface: ChromeUtils.generateQI([kACR])
 }
 
 function nsNewsAutoCompleteSearch() {}
 
 nsNewsAutoCompleteSearch.prototype = {
   // For component registration
   classDescription: "Newsgroup Autocomplete",
   classID: Components.ID("e9bb3330-ac7e-11de-8a39-0800200c9a66"),
@@ -125,13 +125,13 @@ nsNewsAutoCompleteSearch.prototype = {
     aListener.onSearchResult(this, result);
   },
 
   stopSearch: function stopSearch() {
   },
 
   // nsISupports
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteSearch])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteSearch])
 };
 
 // Module
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsNewsAutoCompleteSearch]);
--- a/mailnews/news/test/unit/head_server_setup.js
+++ b/mailnews/news/test/unit/head_server_setup.js
@@ -211,17 +211,17 @@ function make_article(file) {
   return new newsArticle(post);
 }
 
 var articleTextListener = {
   data: "",
   finished: false,
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, 0);
 
     // Reduce any \r\n to just \n so we can do a good comparison on any
--- a/mailnews/news/test/unit/test_bug540288.js
+++ b/mailnews/news/test/unit/test_bug540288.js
@@ -9,17 +9,17 @@ var daemon = setupNNTPDaemon();
 var server;
 var localserver;
 
 var streamListener =
 {
   _data: "",
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, 0);
 
     // Reduce any \r\n to just \n so we can do a good comparison on any
--- a/mailnews/news/test/unit/test_bug695309.js
+++ b/mailnews/news/test/unit/test_bug695309.js
@@ -69,17 +69,17 @@ function* trigger_bug() {
       dump(event + " triggered for " + item.prettyName + "!\n\n\n");
       if (event == "FolderLoaded" &&
           item.prettyName == "test.subscribe.simple") {
         folder.getNewMessages(null, asyncUrlListener);
       } else if (event == "FolderLoaded" && item == folder) {
         async_driver();
       }
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIFolderListener])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIFolderListener])
   };
   MailServices.mailSession.AddFolderListener(folderListener, Ci.nsIFolderListener.event);
   // Again, two things will need to be listened for
   yield false;
   yield false;
   Assert.equal(folder.msgDatabase.dBFolderInfo.highWater, highWater);
   yield true;
 }
--- a/mailnews/news/test/unit/test_getNewsMessage.js
+++ b/mailnews/news/test/unit/test_getNewsMessage.js
@@ -14,17 +14,17 @@ var daemon = setupNNTPDaemon();
 var server;
 var localserver;
 
 var streamListener =
 {
   _data: "",
 
   QueryInterface:
-    XPCOMUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
+    ChromeUtils.generateQI([Ci.nsIStreamListener, Ci.nsIRequestObserver]),
 
   // nsIRequestObserver
   onStartRequest: function(aRequest, aContext) {
   },
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     Assert.equal(aStatusCode, 0);
 
     // Reduce any \r\n to just \n so we can do a good comparison on any
--- a/mailnews/news/test/unit/test_internalUris.js
+++ b/mailnews/news/test/unit/test_internalUris.js
@@ -17,18 +17,18 @@ var dummyMsgWindow = {
         async_driver();
       },
       showProgress: function () {}
     };
   },
   get promptDialog() {
     return alertUtilsPrompts;
   },
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgWindow,
-                                         Ci.nsISupportsWeakReference])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgWindow,
+                                          Ci.nsISupportsWeakReference])
 };
 var daemon, localserver, server;
 
 var tests = [
   test_newMsgs,
   test_cancel,
   test_fetchMessage,
   test_search,
@@ -79,18 +79,18 @@ function* test_fetchMessage() {
   var statuscode = -1;
   let streamlistener = {
     onDataAvailable: function() {},
     onStartRequest: function() {
     },
     onStopRequest: function (aRequest, aContext, aStatus) {
       statuscode = aStatus;
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener,
-                                           Ci.nsIRequestObserver])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener,
+                                            Ci.nsIRequestObserver])
   };
   let folder = localserver.rootFolder.getChildNamed("test.filter");
   MailServices.nntp.fetchMessage(folder, 2, null, streamlistener, asyncUrlListener);
   yield false;
   Assert.equal(statuscode, Cr.NS_OK);
   yield true;
 }
 
@@ -199,18 +199,18 @@ function* test_escapedName() {
   var statuscode = -1;
   let streamlistener = {
     onDataAvailable: function() {},
     onStartRequest: function() {
     },
     onStopRequest: function (aRequest, aContext, aStatus) {
       statuscode = aStatus;
     },
-    QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener,
-                                           Ci.nsIRequestObserver])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener,
+                                            Ci.nsIRequestObserver])
   };
   MailServices.nntp.fetchMessage(folder, 1, null, streamlistener, asyncUrlListener);
   yield false;
   Assert.equal(statuscode, Cr.NS_OK);
   yield true;
 }
 
 function run_test() {
--- a/mailnews/test/resources/MockFactory.js
+++ b/mailnews/test/resources/MockFactory.js
@@ -47,17 +47,17 @@ var MockFactory = {
           let genuine = originalFactory.createInstance(outer, iid);
           wrappedMock._genuine = genuine;
         } catch(ex) {
           dump(ex);
         }
 
         return wrappedMock.QueryInterface(iid);
       },
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory])
     };
 
     Cm.QueryInterface(Ci.nsIComponentRegistrar)
       .registerFactory(Components.ID(uuid),
                        "A Mock for " + contractID,
                        contractID, factory);
 
     this._registeredComponents[uuid] = {
--- a/mailnews/test/resources/NetworkTestUtils.jsm
+++ b/mailnews/test/resources/NetworkTestUtils.jsm
@@ -47,17 +47,17 @@ function SocksClient(client_in, client_o
   this.client_in = client_in;
   this.client_out = client_out;
   this.inbuf = [];
   this.state = STATE_WAIT_GREETING;
   this.waitRead(this.client_in);
 }
 SocksClient.prototype = {
   // ... implement nsIInputStreamCallback ...
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIInputStreamCallback]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIInputStreamCallback]),
   onInputStreamReady(input) {
     var len = input.available();
     var bin = new BinaryInputStream(input);
     var data = bin.readByteArray(len);
     this.inbuf = this.inbuf.concat(data);
 
     switch (this.state) {
       case STATE_WAIT_GREETING:
@@ -174,17 +174,17 @@ SocksClient.prototype = {
 function SocksTestServer() {
   this.listener = ServerSocket(-1, true, -1);
   dump("Starting SOCKS server on " + this.listener.port + '\n');
   this.port = this.listener.port;
   this.listener.asyncListen(this);
   this.client_connections = [];
 }
 SocksTestServer.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIServerSocketListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIServerSocketListener]),
 
   onSocketAccepted(socket, trans) {
     var input = trans.openInputStream(0, 0, 0);
     var output = trans.openOutputStream(0, 0, 0);
     var client = new SocksClient(input, output);
     this.client_connections.push(client);
   },
 
@@ -234,17 +234,17 @@ var NetworkTestUtils = {
       Services.prefs.setIntPref("network.proxy.type", 2);
       Services.prefs.setCharPref("network.proxy.autoconfig_url", pac);
       */
 
       // Until then, we'll serve the actual proxy via a proxy filter.
       let pps = Cc["@mozilla.org/network/protocol-proxy-service;1"]
                   .getService(Ci.nsIProtocolProxyService);
       let filter = {
-        QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolProxyFilter]),
+        QueryInterface: ChromeUtils.generateQI([Ci.nsIProtocolProxyFilter]),
         applyFilter(aProxyService, aURI, aProxyInfo, aCallback) {
           if (aURI.host != "localhost" && aURI.host != "127.0.0.1") {
             aCallback.onProxyFilterResult(pps.newProxyInfo("socks", "localhost", gSocksServer.port,
               Ci.nsIProxyInfo.TRANSPARENT_PROXY_RESOLVES_HOST, 0, null));
             return;
           }
           aCallback.onProxyFilterResult(aProxyInfo);
         },
--- a/mailnews/test/resources/PromiseTestUtils.jsm
+++ b/mailnews/test/resources/PromiseTestUtils.jsm
@@ -27,17 +27,17 @@ PromiseTestUtils.PromiseUrlListener = fu
   this.wrapped = aWrapped;
   this._promise = new Promise((resolve, reject) => {
     this._resolve = resolve;
     this._reject = reject;
   });
 };
 
 PromiseTestUtils.PromiseUrlListener.prototype = {
-  QueryInterface:   XPCOMUtils.generateQI([Ci.nsIUrlListener]),
+  QueryInterface:   ChromeUtils.generateQI([Ci.nsIUrlListener]),
 
   OnStartRunningUrl: function(aUrl) {
     if (this.wrapped && this.wrapped.OnStartRunningUrl)
       this.wrapped.OnStartRunningUrl(aUrl);
   },
   OnStopRunningUrl: function(aUrl, aExitCode) {
     if (this.wrapped && this.wrapped.OnStopRunningUrl)
       this.wrapped.OnStopRunningUrl(aUrl, aExitCode);
@@ -61,17 +61,17 @@ PromiseTestUtils.PromiseCopyListener = f
   this._promise = new Promise((resolve, reject) => {
     this._resolve = resolve;
     this._reject = reject;
   });
   this._result = { messageKeys: [], messageIds: [] };
 };
 
 PromiseTestUtils.PromiseCopyListener.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgCopyServiceListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgCopyServiceListener]),
   OnStartCopy: function() {
     if (this.wrapped && this.wrapped.OnStartCopy)
       this.wrapped.OnStartCopy();
   },
   OnProgress: function(aProgress, aProgressMax) {
     if (this.wrapped && this.wrapped.OnProgress)
       this.wrapped.OnProgress(aProgress, aProgressMax);
   },
@@ -111,17 +111,17 @@ PromiseTestUtils.PromiseStreamListener =
     this._resolve = resolve;
     this._reject = reject;
   });
   this._data = null;
   this._stream = null;
 };
 
 PromiseTestUtils.PromiseStreamListener.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamListener]),
 
   onStartRequest : function (aRequest, aContext) {
     if (this.wrapped && this.wrapped.onStartRequest)
       this.wrapped.onStartRequest(aRequest, aContext);
     this._data = "";
     this._stream = null;
   },
 
@@ -156,17 +156,17 @@ PromiseTestUtils.PromiseStreamListener.p
  *                 "DeleteOrMoveMsgCompleted".
  * @return         promise that resolves when the event occurs
  */
 
 var nsIMFNService = Ci.nsIMsgFolderNotificationService;
 PromiseTestUtils.promiseFolderEvent = function promiseFolderEvent(folder, event) {
   return new Promise( (resolve, reject) => {
     let folderListener = {
-      QueryInterface: XPCOMUtils.generateQI([Ci.nsIFolderListener]),
+      QueryInterface: ChromeUtils.generateQI([Ci.nsIFolderListener]),
       OnItemEvent: function onItemEvent(aEventFolder, aEvent) {
         if (folder === aEventFolder &&
             event == aEvent) {
           MailServices.mailSession.RemoveFolderListener(folderListener);
           resolve();
         }
       },
     };
@@ -262,17 +262,17 @@ PromiseTestUtils.PromiseSearchNotify = f
   this.wrapped = aWrapped;
   this._promise = new Promise((resolve, reject) => {
     this._resolve = resolve;
     this._reject = reject;
   });
 }
 
 PromiseTestUtils.PromiseSearchNotify.prototype = {
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIMsgSearchNotify]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgSearchNotify]),
   onSearchHit: function(aHeader, aFolder) {
     if (this.wrapped && this.wrapped.onSearchHit)
       this.wrapped.onSearchHit(aHeader, aFolder);
   },
   onSearchDone: function onSearchDone(aResult) {
     this._searchSession.unregisterListener(this);
     if (this.wrapped && this.wrapped.onSearchDone)
       this.wrapped.onSearchDone(aResult);
--- a/mailnews/test/resources/alertTestUtils.js
+++ b/mailnews/test/resources/alertTestUtils.js
@@ -123,17 +123,17 @@ var alertUtilsPrompts = {
       return select(aDialogTitle, aText, aCount, aSelectList,
                     aOutSelection);
     }
 
     do_throw("select unexpectedly called: " + aText + "\n");
     return false;
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPrompt])
 };
 
 var alertUtilsPromptService = {
    alert: function(aParent, aDialogTitle, aText) {
     if (typeof alertPS == "function") {
       alertPS(aParent, aDialogTitle, aText);
       return;
     }
@@ -229,31 +229,31 @@ var alertUtilsPromptService = {
   },
 
   createInstance: function createInstance(outer, iid) {
     if (outer != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return this.QueryInterface(iid);
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService,
-                                         Ci.nsIPromptService2])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIPromptService,
+                                          Ci.nsIPromptService2])
 };
 
 var alertUtilsWindowWatcher = {
   getNewPrompter: function(aParent) {
     return alertUtilsPrompts;
   },
 
   getNewAuthPrompter: function(aParent) {
     return Cc["@mozilla.org/login-manager/prompter;1"]
             .getService(Ci.nsIAuthPrompt);
   },
 
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWindowWatcher])
 };
 
 function registerAlertTestUtils()
 {
   MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
                       alertUtilsWindowWatcher);
   MockRegistrar.register("@mozilla.org/embedcomp/prompt-service;1",
                       alertUtilsPromptService);
--- a/mailnews/test/resources/mailTestUtils.js
+++ b/mailnews/test/resources/mailTestUtils.js
@@ -492,16 +492,16 @@ var mailTestUtils = {
           var mimeTypes = Services.dirsvc.get("ProfD", Ci.nsIFile);
           mimeTypes.append("mimeTypes.rdf");
           return mimeTypes;
         }
         throw Cr.NS_ERROR_FAILURE;
       },
 
       QueryInterface:
-        XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider])
+        ChromeUtils.generateQI([Ci.nsIDirectoryServiceProvider])
     };
 
     this._providerSvc = provider;
     Services.dirsvc.QueryInterface(Ci.nsIDirectoryService)
                    .registerProvider(provider);
   }
 };