12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006 |
- # HG changeset patch
- # User Ian Neal <iann_cvs@blueyonder.co.uk>
- # Date 1581435120 -3600
- # Parent 10fa8911ada5a6afab1a7c6f0e9eb849d8c786f8
- Bug 1614671 - Port |Bug 1456035 Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI|, |Bug 1456035 Part 5 - Convert manual QueryInterface to ChromeUtils.generateQI| and |Bug 1460092 - Add ESLint rule to enforce use of ChromeUtils.generateQI| to SeaMonkey. r=frg
- diff --git a/suite/base/content/viewZoomOverlay.js b/suite/base/content/viewZoomOverlay.js
- --- a/suite/base/content/viewZoomOverlay.js
- +++ b/suite/base/content/viewZoomOverlay.js
- @@ -29,20 +29,20 @@ var FullZoom = FullZoom || {
- get siteSpecific() {
- return this._siteSpecificPref;
- },
-
- //**************************************************************************//
- // nsISupports
-
- QueryInterface:
- - XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsIContentPrefObserver,
- - Ci.nsIContentPrefCallback2,
- - Ci.nsISupportsWeakReference]),
- + ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsIContentPrefObserver,
- + Ci.nsIContentPrefCallback2,
- + Ci.nsISupportsWeakReference]),
-
- //**************************************************************************//
- // Initialization & Destruction
-
- init: function FullZoom_init() {
- // Listen for scrollwheel events so we can save scrollwheel-based changes.
- window.addEventListener("wheel", this, true);
-
- diff --git a/suite/browser/browser-places.js b/suite/browser/browser-places.js
- --- a/suite/browser/browser-places.js
- +++ b/suite/browser/browser-places.js
- @@ -788,17 +788,17 @@ var BookmarkingUI = {
- PlacesUtils.bookmarks.removeObserver(this);
- }
-
- if (this._pendingUpdate) {
- delete this._pendingUpdate;
- }
- },
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsINavBookmarkObserver
- ]),
-
- get _starredTooltip()
- {
- delete this._starredTooltip;
- return this._starredTooltip =
- gNavigatorBundle.getString("starButtonOn.tooltip");
- diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js
- --- a/suite/browser/navigator.js
- +++ b/suite/browser/navigator.js
- @@ -48,21 +48,20 @@ var gIgnoreClick = false;
- // Listeners for updating zoom value in status bar
- var ZoomListeners =
- {
-
- // Identifies the setting in the content prefs database.
- name: "browser.content.full-zoom",
-
- QueryInterface:
- - XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsIContentPrefObserver,
- - Ci.nsIContentPrefCallback2,
- - Ci.nsISupportsWeakReference,
- - Ci.nsISupports]),
- + ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsIContentPrefObserver,
- + Ci.nsIContentPrefCallback2,
- + Ci.nsISupportsWeakReference]),
-
- init: function ()
- {
- Cc["@mozilla.org/content-pref/service;1"]
- .getService(Ci.nsIContentPrefService2)
- .addObserverForName(this.name, this);
-
- Services.prefs.addObserver("browser.zoom.", this, true);
- @@ -175,18 +174,18 @@ var gStatusBarPopupIconPrefListener =
- popupIcon.hidden = true;
-
- else if (gBrowser.getNotificationBox().popupCount)
- popupIcon.hidden = false;
- }
- };
-
- var gFormSubmitObserver = {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver,
- - Ci.nsIObserver]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIFormSubmitObserver,
- + Ci.nsIObserver]),
-
- panel: null,
-
- init: function()
- {
- this.panel = document.getElementById("invalid-form-popup");
- },
-
- diff --git a/suite/browser/nsBrowserContentHandler.js b/suite/browser/nsBrowserContentHandler.js
- --- a/suite/browser/nsBrowserContentHandler.js
- +++ b/suite/browser/nsBrowserContentHandler.js
- @@ -214,27 +214,21 @@ function doSearch(aSearchTerm, aFeatures
- }
-
- var nsBrowserContentHandler = {
- get wrappedJSObject() {
- return this;
- },
-
- /* nsISupports */
- - QueryInterface: function QueryInterface(iid) {
- - if (iid.equals(nsISupports) ||
- - iid.equals(nsICommandLineHandler) ||
- - iid.equals(nsICommandLine) ||
- - iid.equals(nsICommandLineValidator) ||
- - iid.equals(nsIContentHandler) ||
- - iid.equals(nsIFactory))
- - return this;
- -
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLineHandler,
- + Ci.nsICommandLine,
- + Ci.nsICommandLineValidator,
- + Ci.nsIContentHandler,
- + Ci.nsIFactory]),
-
- _handledURI: null,
-
- /* nsICommandLineHandler */
- handle: function handle(cmdLine) {
- var features = "chrome,all,dialog=no";
- try {
- var width = cmdLine.handleFlagWithParam("width", false);
- diff --git a/suite/browser/nsBrowserContentListener.js b/suite/browser/nsBrowserContentListener.js
- --- a/suite/browser/nsBrowserContentListener.js
- +++ b/suite/browser/nsBrowserContentListener.js
- @@ -59,25 +59,19 @@ nsBrowserContentListener.prototype =
- },
- close: function()
- {
- this.contentWindow = null;
- var uriLoader = Cc["@mozilla.org/uriloader;1"].getService(Ci.nsIURILoader);
-
- uriLoader.unRegisterContentListener(this);
- },
- - QueryInterface: function(iid)
- - {
- - if (iid.equals(Ci.nsIURIContentListener) ||
- - iid.equals(Ci.nsISupportsWeakReference) ||
- - iid.equals(Ci.nsISupports))
- - return this;
-
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIURIContentListener,
- + Ci.nsISupportsWeakReference]),
-
- doContent: function(contentType, isContentPreferred, request, contentHandler)
- {
- // forward the doContent to our content area webshell
- var docShell = this.contentWindow.docShell;
- if (Services.prefs.getIntPref("browser.link.open_external") == nsIBrowserDOMWindow.OPEN_NEWTAB) {
- var newTab = gBrowser.loadOneTab("about:blank", {
- inBackground: Services.prefs.getBoolPref("browser.tabs.loadDivertedInBackground")});
- diff --git a/suite/browser/nsBrowserStatusHandler.js b/suite/browser/nsBrowserStatusHandler.js
- --- a/suite/browser/nsBrowserStatusHandler.js
- +++ b/suite/browser/nsBrowserStatusHandler.js
- @@ -13,25 +13,19 @@ nsBrowserStatusHandler.prototype =
- // Stored Status, Link and Loading values
- status : "",
- defaultStatus : "",
- jsStatus : "",
- jsDefaultStatus : "",
- overLink : "",
- feeds : [],
-
- - QueryInterface : function(aIID)
- - {
- - if (aIID.equals(Ci.nsIWebProgressListener) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsIXULBrowserWindow) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference,
- + Ci.nsIXULBrowserWindow]),
-
- init : function()
- {
- this.urlBar = document.getElementById("urlbar");
- this.throbberElement = document.getElementById("navigator-throbber");
- this.statusMeter = document.getElementById("statusbar-icon");
- this.statusPanel = document.getElementById("statusbar-progresspanel");
- this.stopButton = document.getElementById("stop-button");
- diff --git a/suite/browser/nsTypeAheadFind.js b/suite/browser/nsTypeAheadFind.js
- --- a/suite/browser/nsTypeAheadFind.js
- +++ b/suite/browser/nsTypeAheadFind.js
- @@ -60,17 +60,17 @@ typeAheadFind.prototype = {
- mFound: null,
- mLinks: false,
- mSearchString: "",
- mSelection: null,
- mTimer: null,
- mXULBrowserWindow: null,
-
- /* nsISupports */
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsISupportsWeakReference,
- Ci.nsIObserver,
- Ci.nsITimerCallback,
- Ci.nsISelectionListener]),
-
- /* nsIObserver */
- observe: function(aSubject, aTopic, aData) {
- if (aTopic == "app-startup") {
- diff --git a/suite/browser/tabbrowser.xml b/suite/browser/tabbrowser.xml
- --- a/suite/browser/tabbrowser.xml
- +++ b/suite/browser/tabbrowser.xml
- @@ -746,24 +746,20 @@
- return allowRefresh;
- },
-
- addFeed: function(aLink)
- {
- this.mFeeds.push(aLink);
- },
-
- - QueryInterface: function(aIID) {
- - if (aIID.equals(Ci.nsIWebProgressListener) ||
- - aIID.equals(Ci.nsIWebProgressListener2) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([
- + Ci.nsIWebProgressListener,
- + Ci.nsIWebProgressListener2,
- + Ci.nsISupportsWeakReference]),
- });
- ]]>
- </body>
- </method>
-
- <method name="mInstallSH">
- <parameter name="aBrowser"/>
- <parameter name="aSH"/>
- @@ -801,24 +797,19 @@
- onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
- {
- },
-
- onSecurityChange : function(aWebProgress, aRequest, aState)
- {
- },
-
- - QueryInterface : function(aIID)
- - {
- - if (aIID.equals(Ci.nsIWebProgressListener) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface : ChromeUtils.generateQI([
- + Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference]),
- });
- ]]>
- </body>
- </method>
-
- <method name="setIcon">
- <parameter name="aTab"/>
- <parameter name="aURI"/>
- diff --git a/suite/browser/test/browser/browser_bug561636.js b/suite/browser/test/browser/browser_bug561636.js
- --- a/suite/browser/test/browser/browser_bug561636.js
- +++ b/suite/browser/test/browser/browser_bug561636.js
- @@ -17,17 +17,17 @@ function checkPopupHide()
- function checkPopupMessage(doc)
- {
- is(gInvalidFormPopup.firstChild.textContent,
- doc.getElementById('i').validationMessage,
- "The panel should show the message from validationMessage");
- }
-
- var gObserver = {
- - QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
- + QueryInterface : ChromeUtils.generateQI([Ci.nsIFormSubmitObserver]),
-
- notifyInvalidSubmit : function (aFormElement, aInvalidElements)
- {
- }
- };
-
- function test()
- {
- diff --git a/suite/browser/test/browser/browser_bug623155.js b/suite/browser/test/browser/browser_bug623155.js
- --- a/suite/browser/test/browser/browser_bug623155.js
- +++ b/suite/browser/test/browser/browser_bug623155.js
- @@ -53,23 +53,18 @@ function test() {
- gBrowser.getBrowserForTab(gNewTab)
- .webProgress
- .addProgressListener(gWebProgressListener,
- Ci.nsIWebProgress
- .NOTIFY_LOCATION);
- }
-
- var gWebProgressListener = {
- - QueryInterface: function(aIID) {
- - if (aIID.equals(Ci.nsIWebProgressListener) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference]),
-
- // ---------------------------------------------------------------------------
- // NOTIFY_LOCATION mode should work fine without these methods.
- //
- //onStateChange: function() {},
- //onStatusChange: function() {},
- //onProgressChange: function() {},
- //onSecurityChange: function() {},
- diff --git a/suite/components/bindings/findbar.xml b/suite/components/bindings/findbar.xml
- --- a/suite/components/bindings/findbar.xml
- +++ b/suite/components/bindings/findbar.xml
- @@ -41,24 +41,18 @@
- prefsvc.getBoolPref("accessibility.typeaheadfind.autostart");
- this._useFindbar =
- prefsvc.getBoolPref("accessibility.typeaheadfind.usefindbar");
- ]]></constructor>
-
- <field name="_suiteObserver"><![CDATA[({
- _self: this,
-
- - QueryInterface: function(aIID) {
- - if (aIID.equals(Ci.nsIObserver) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsISupportsWeakReference]),
-
- observe: function(aSubject, aTopic, aPrefName) {
- if (aTopic != "nsPref:changed")
- return;
-
- var prefsvc =
- aSubject.QueryInterface(Ci.nsIPrefBranch);
-
- diff --git a/suite/components/bindings/notification.xml b/suite/components/bindings/notification.xml
- --- a/suite/components/bindings/notification.xml
- +++ b/suite/components/bindings/notification.xml
- @@ -1580,18 +1580,19 @@
- optInCB.checked = Services.prefs.getBoolPref("dom.ipc.plugins.reportCrashURL");
- }
-
- // If we're showing the link to manually trigger report submission, we'll
- // want to be able to update all the instances of the UI for this crash to
- // show an updated message when a report is submitted.
- if (doPrompt) {
- let observer = {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsISupportsWeakReference]),
- + QueryInterface: ChromeUtils.generateQI([
- + Ci.nsIObserver,
- + Ci.nsISupportsWeakReference]),
- observe: function(subject, topic, data) {
- let propertyBag = subject;
- if (!(propertyBag instanceof Ci.nsIPropertyBag2))
- return;
- // Ignore notifications for other crashes.
- if (propertyBag.get("minidumpID") != pluginDumpID)
- return;
- statusDiv.setAttribute("status", data);
- diff --git a/suite/components/console/content/consoleBindings.xml b/suite/components/console/content/consoleBindings.xml
- --- a/suite/components/console/content/consoleBindings.xml
- +++ b/suite/components/console/content/consoleBindings.xml
- @@ -389,22 +389,17 @@
-
- <constructor>this.init();</constructor>
- <destructor>this.destroy();</destructor>
-
- <!-- Command controller for the copy command -->
- <field name="_controller"><![CDATA[({
- _outer: this,
-
- - QueryInterface: function(aIID) {
- - if (aIID.equals(Ci.nsIController) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIController]),
-
- supportsCommand: function(aCommand) {
- return aCommand == "cmd_copy";
- },
-
- isCommandEnabled: function(aCommand) {
- return aCommand == "cmd_copy" && this._outer.selectedItem;
- },
- diff --git a/suite/components/console/jsconsole-clhandler.js b/suite/components/console/jsconsole-clhandler.js
- --- a/suite/components/console/jsconsole-clhandler.js
- +++ b/suite/components/console/jsconsole-clhandler.js
- @@ -22,12 +22,12 @@ jsConsoleHandler.prototype = {
-
- if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO)
- cmdLine.preventDefault = true;
- },
-
- helpInfo : " --suiteconsole Open the Error console.\n",
-
- classID: Components.ID("{afeee354-8c99-4725-adb1-8502218c5c3c}"),
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsICommandLineHandler]),
- };
-
- this.NSGetFactory = XPCOMUtils.generateNSGetFactory([jsConsoleHandler]);
- diff --git a/suite/components/dataman/content/dataman.js b/suite/components/dataman/content/dataman.js
- --- a/suite/components/dataman/content/dataman.js
- +++ b/suite/components/dataman/content/dataman.js
- @@ -119,18 +119,18 @@ var gDataman = {
- },
-
- debugError: function dataman_debugError(aLogMessage) {
- if (this.debug)
- Cu.reportError(aLogMessage);
- },
-
- // :::::::::: data change observers ::::::::::
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsIContentPrefObserver]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsIContentPrefObserver]),
-
- observe: function co_observe(aSubject, aTopic, aData) {
- gDataman.debugMsg("Observed: " + aTopic + " - " + aData);
- switch (aTopic) {
- case "cookie-changed":
- gCookies.reactToChange(aSubject, aData);
- break;
- case "perm-changed":
- diff --git a/suite/components/downloads/DownloadsCommon.jsm b/suite/components/downloads/DownloadsCommon.jsm
- --- a/suite/components/downloads/DownloadsCommon.jsm
- +++ b/suite/components/downloads/DownloadsCommon.jsm
- @@ -67,18 +67,18 @@ const kDownloadsStringsRequiringPluralFo
- const kPartialDownloadSuffix = ".part";
-
- const kPrefBranch = Services.prefs.getBranch("browser.download.");
-
- const PREF_DM_BEHAVIOR = "browser.download.manager.behavior";
- const PROGRESS_DIALOG_URL = "chrome://communicator/content/downloads/progressDialog.xul";
-
- 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];
- diff --git a/suite/components/downloads/content/treeView.js b/suite/components/downloads/content/treeView.js
- --- a/suite/components/downloads/content/treeView.js
- +++ b/suite/components/downloads/content/treeView.js
- @@ -15,17 +15,17 @@ function DownloadTreeView() {
- this._searchTerms = [];
- this.dateTimeFormatter =
- new Services.intl.DateTimeFormat(undefined,
- {dateStyle: "short",
- timeStyle: "long"});
- }
-
- DownloadTreeView.prototype = {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView]),
-
- // ***** nsITreeView attributes and methods *****
- get rowCount() {
- return this._dlList.length;
- },
-
- selection: null,
-
- diff --git a/suite/components/downloads/content/uploadProgress.js b/suite/components/downloads/content/uploadProgress.js
- --- a/suite/components/downloads/content/uploadProgress.js
- +++ b/suite/components/downloads/content/uploadProgress.js
- @@ -160,17 +160,17 @@ var gProgressListener = {
- onLocationChange: function( aWebProgress, aRequest, aLocation, aFlags ) {
- },
-
- onSecurityChange: function( aWebProgress, aRequest, aState ) {
- },
-
- // ---------- nsISupports methods ----------
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsIWebProgressListener2,
- Ci.nsIWebProgressListener,
- Ci.nsIInterfaceRequestor]),
-
- // ---------- nsIInterfaceRequestor methods ----------
-
- getInterface: function(aIID) {
- if (aIID.equals(Ci.nsIPrompt) ||
- diff --git a/suite/components/feeds/FeedConverter.js b/suite/components/feeds/FeedConverter.js
- --- a/suite/components/feeds/FeedConverter.js
- +++ b/suite/components/feeds/FeedConverter.js
- @@ -102,17 +102,17 @@ FeedConverter.prototype = {
- /**
- * Records if the feed was sniffed
- */
- _sniffed: false,
-
- /**
- * See nsISupports.idl
- */
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsIFeedResultListener,
- Ci.nsIStreamConverter,
- Ci.nsIStreamListener,
- Ci.nsIRequestObserver]),
- classID: Components.ID("{88592f45-3866-4c8e-9d8a-ab58b290fcf7}"),
-
- /**
- * See nsIStreamConverter.idl
- @@ -445,16 +445,16 @@ FeedResultService.prototype = {
- // send the holes to the end
- resultList.sort();
- // and trim the list
- resultList.splice(resultList.length - deletions, deletions);
- if (resultList.length == 0)
- delete this._results[uri.spec];
- },
-
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIFeedResultService]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIFeedResultService]),
- classID: Components.ID("{e5b05e9d-f037-48e4-b9a4-b99476582927}")
- };
-
- var components = [FeedConverter,
- FeedResultService];
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
- diff --git a/suite/components/feeds/FeedWriter.js b/suite/components/feeds/FeedWriter.js
- --- a/suite/components/feeds/FeedWriter.js
- +++ b/suite/components/feeds/FeedWriter.js
- @@ -1196,14 +1196,14 @@ FeedWriter.prototype = {
- case PREF_VIDEO_SELECTED_ACTION:
- case PREF_AUDIO_SELECTED_ACTION:
- this._setAlwaysUseCheckedState(feedType);
- }
- }
- },
-
- classID: FEEDWRITER_CID,
- - QueryInterface: XPCOMUtils.generateQI([ Ci.nsIDOMGlobalPropertyInitializer,
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer,
- Ci.nsIObserver])
-
- };
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([FeedWriter]);
- diff --git a/suite/components/feeds/WebContentConverter.js b/suite/components/feeds/WebContentConverter.js
- --- a/suite/components/feeds/WebContentConverter.js
- +++ b/suite/components/feeds/WebContentConverter.js
- @@ -51,29 +51,29 @@ WebContentConverter.prototype = {
- onStopRequest: function onStopRequest() { },
-
- onStartRequest: function onStartRequest(request, context) {
- var wccr = Cc[WCCR_CONTRACTID]
- .getService(Ci.nsIWebContentConverterService);
- wccr.loadPreferredHandler(request);
- },
-
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsIStreamConverter,
- Ci.nsIStreamListener])
- };
-
- var WebContentConverterFactory = {
- createInstance: function createInstance(outer, iid) {
- if (outer != null)
- throw Cr.NS_ERROR_NO_AGGREGATION;
- return new WebContentConverter().QueryInterface(iid);
- },
-
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsIFactory])
- };
-
- function ServiceInfo(contentType, uri, name) {
- this._contentType = contentType;
- this._uri = uri;
- this._name = name;
- }
- @@ -117,17 +117,17 @@ ServiceInfo.prototype = {
-
- /**
- * See nsIWebContentHandlerInfo
- */
- getHandlerURI: function getHandlerURI(uri) {
- return this._uri.replace(/%s/gi, encodeURIComponent(uri));
- },
-
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsIWebContentHandlerInfo])
- };
-
- function WebContentConverterRegistrar() {
- this._contentTypes = { };
- this._autoHandleContentTypes = { };
- }
-
- @@ -833,16 +833,16 @@ WebContentConverterRegistrar.prototype =
- Ci.nsIWebContentHandlerRegistrar,
- Ci.nsIObserver,
- Ci.nsIFactory],
- flags: Ci.nsIClassInfo.DOM_OBJECT}),
-
- /**
- * See nsISupports
- */
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsIWebContentConverterService,
- Ci.nsIWebContentHandlerRegistrar,
- Ci.nsIObserver,
- Ci.nsIFactory])
- };
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrar]);
- diff --git a/suite/components/helpviewer/content/help.js b/suite/components/helpviewer/content/help.js
- --- a/suite/components/helpviewer/content/help.js
- +++ b/suite/components/helpviewer/content/help.js
- @@ -574,25 +574,19 @@ nsHelpStatusHandler.prototype = {
- onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) {},
- onProgressChange : function(aWebProgress, aRequest, aCurSelfProgress,
- aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
- onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) {},
- onSecurityChange : function(aWebProgress, aRequest, state) {},
- onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags) {
- UpdateBackForwardButtons();
- },
- - QueryInterface : function(aIID) {
- - if (aIID.equals(Ci.nsIWebProgressListener) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsIXULBrowserWindow) ||
- - aIID.equals(Ci.nsISupports)) {
- - return this;
- - }
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface : ChromeUtils.generateQI([Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference,
- + Ci.nsIXULBrowserWindow]),
-
- init : function() {},
-
- destroy : function() {},
-
- setJSStatus : function(status) {},
- setOverLink : function(link, context) {},
- onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {}
- @@ -839,17 +833,11 @@ var helpContentListener = {
- isPreferred: function(aContentType, aDesiredContentType) {
- return false;
- },
- canHandleContent: function(aContentType, aIsContentPreferred, aDesiredContentType) {
- return false;
- },
- loadCookie: null,
- parentContentListener: null,
- - QueryInterface: function (aIID) {
- - if (aIID.equals(Ci.nsIURIContentListener) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIURIContentListener,
- + Ci.nsISupportsWeakReference]),
- };
- diff --git a/suite/components/migration/SuiteProfileMigrator.js b/suite/components/migration/SuiteProfileMigrator.js
- --- a/suite/components/migration/SuiteProfileMigrator.js
- +++ b/suite/components/migration/SuiteProfileMigrator.js
- @@ -134,15 +134,15 @@ ProfileMigrator.prototype = {
- if (migrator) {
- return [key, migrator];
- }
- }
-
- return ["", null];
- },
-
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIProfileMigrator]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIProfileMigrator]),
- classDescription: "Profile Migrator",
- contractID: "@mozilla.org/toolkit/profile-migrator;1",
- classID: Components.ID("{d5148b7c-ba4e-4f7a-a80b-1ae48b90b910}"),
- };
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([ProfileMigrator]);
- diff --git a/suite/components/nsGopherProtocolStubHandler.js b/suite/components/nsGopherProtocolStubHandler.js
- --- a/suite/components/nsGopherProtocolStubHandler.js
- +++ b/suite/components/nsGopherProtocolStubHandler.js
- @@ -15,17 +15,17 @@ function GopherProtocol()
- {
- }
-
- GopherProtocol.prototype = {
- classDescription: "Gopher protocol handler stub",
- classID: Components.ID("{22042bdb-56e4-47c6-8b12-fdfa859c05a9}"),
-
- // nsISupports
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIProtocolHandler]),
-
- // nsIProtocolHandler
- scheme: "gopher",
- defaultPort: 70,
- protocolFlags: Ci.nsIProtocolHandler.URI_NORELATIVE |
- Ci.nsIProtocolHandler.URI_NOAUTH |
- Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE,
-
- diff --git a/suite/components/nsSuiteGlue.js b/suite/components/nsSuiteGlue.js
- --- a/suite/components/nsSuiteGlue.js
- +++ b/suite/components/nsSuiteGlue.js
- @@ -1560,20 +1560,20 @@ SuiteGlue.prototype = {
- } catch (e) {
- Cu.reportError("Error displaying tab received by Sync: " + e);
- }
- },
-
- // for XPCOM
- classID: Components.ID("{bbbbe845-5a1b-40ee-813c-f84b8faaa07c}"),
-
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsIWebProgressListener,
- - Ci.nsISupportsWeakReference,
- - Ci.nsISuiteGlue])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference,
- + Ci.nsISuiteGlue])
-
- }
-
- /**
- * ContentPermissionIntegration is responsible for showing the user
- * simple permission prompts when content requests additional
- * capabilities.
- *
- @@ -1618,17 +1618,17 @@ var ContentPermissionIntegration = {
- },
- };
-
- function ContentPermissionPrompt() {}
-
- ContentPermissionPrompt.prototype = {
- classID: Components.ID("{9d4c845d-3f09-402a-b66d-50f291d7d50f}"),
-
- - 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
- diff --git a/suite/components/places/content/bookmarkProperties.js b/suite/components/places/content/bookmarkProperties.js
- --- a/suite/components/places/content/bookmarkProperties.js
- +++ b/suite/components/places/content/bookmarkProperties.js
- @@ -367,22 +367,17 @@ var BookmarkPropertiesPanel = {
- this._height += -oldHeight + newHeight;
- elementsHeight.set(id, newHeight);
- }
- break;
- }
- },
-
- // nsISupports
- - QueryInterface: function BPP_QueryInterface(aIID) {
- - if (aIID.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([]),
-
- _element: function BPP__element(aID) {
- return document.getElementById("editBMPanel_" + aID);
- },
-
- onDialogUnload() {
- // gEditItemOverlay does not exist anymore here, so don't rely on it.
- this._mutationObserver.disconnect();
- diff --git a/suite/components/places/content/browserPlacesViews.js b/suite/components/places/content/browserPlacesViews.js
- --- a/suite/components/places/content/browserPlacesViews.js
- +++ b/suite/components/places/content/browserPlacesViews.js
- @@ -14,16 +14,19 @@ function PlacesViewBase(aPlace, aOptions
- if ("viewElt" in aOptions)
- this._viewElt = aOptions.viewElt;
- this.options = aOptions;
- this._controller = new PlacesController(this);
- this.place = aPlace;
- this._viewElt.controllers.appendController(this._controller);
- }
-
- +PlacesViewBase.interfaces = [Ci.nsINavHistoryResultObserver,
- + Ci.nsISupportsWeakReference];
- +
- PlacesViewBase.prototype = {
- // The xul element that holds the entire view.
- _viewElt: null,
- get viewElt() {
- return this._viewElt;
- },
-
- get associatedElement() {
- @@ -36,19 +39,18 @@ 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(
- - [Ci.nsINavHistoryResultObserver,
- - Ci.nsISupportsWeakReference]),
- + QueryInterface: ChromeUtils.generateQI(
- + PlacesViewBase.interfaces),
-
- _place: "",
- get place() {
- return this._place;
- },
- set place(val) {
- this._place = val;
-
- @@ -997,22 +999,18 @@ function PlacesToolbar(aPlace) {
- }
-
- PlacesToolbar.prototype = {
- __proto__: PlacesViewBase.prototype,
-
- _cbEvents: ["dragstart", "dragover", "dragexit", "dragend", "drop",
- "mousemove", "mouseover", "mouseout"],
-
- - QueryInterface: function PT_QueryInterface(aIID) {
- - if (aIID.equals(Ci.nsITimerCallback))
- - return this;
- -
- - return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsITimerCallback,
- + ...PlacesViewBase.interfaces]),
-
- uninit: function PT_uninit() {
- this._removeEventListeners(this._viewElt, this._cbEvents, false);
- this._removeEventListeners(this._rootElt, ["popupshowing", "popuphidden"],
- true);
- this._removeEventListeners(this._rootElt, ["overflow", "underflow"], true);
- this._removeEventListeners(window, ["resize", "unload"], false);
- this._removeEventListeners(gBrowser.tabContainer, ["TabOpen", "TabClose"], false);
- @@ -1941,20 +1939,16 @@ function PlacesPanelMenuView(aPlace, aVi
- this.options = aOptions;
-
- PlacesViewBase.call(this, aPlace, aOptions);
- }
-
- PlacesPanelMenuView.prototype = {
- __proto__: PlacesViewBase.prototype,
-
- - QueryInterface: function PAMV_QueryInterface(aIID) {
- - return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
- - },
- -
- uninit: function PAMV_uninit() {
- PlacesViewBase.prototype.uninit.apply(this, arguments);
- },
-
- _insertNewItem:
- function PAMV__insertNewItem(aChild, aInsertionNode, aBefore = null) {
- this._domNodes.delete(aChild);
-
- diff --git a/suite/components/places/content/controller.js b/suite/components/places/content/controller.js
- --- a/suite/components/places/content/controller.js
- +++ b/suite/components/places/content/controller.js
- @@ -75,17 +75,17 @@ function PlacesController(aView) {
- }
-
- PlacesController.prototype = {
- /**
- * The places view.
- */
- _view: null,
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsIClipboardOwner
- ]),
-
- // nsIClipboardOwner
- LosingOwnership: function PC_LosingOwnership(aXferable) {
- this.cutNodes = [];
- },
-
- diff --git a/suite/components/places/content/editBookmarkOverlay.js b/suite/components/places/content/editBookmarkOverlay.js
- --- a/suite/components/places/content/editBookmarkOverlay.js
- +++ b/suite/components/places/content/editBookmarkOverlay.js
- @@ -454,17 +454,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.
- diff --git a/suite/components/places/content/places.js b/suite/components/places/content/places.js
- --- a/suite/components/places/content/places.js
- +++ b/suite/components/places/content/places.js
- @@ -156,22 +156,17 @@ var PlacesOrganizer = {
-
- // remove the "Properties" context-menu item, we've our own details pane
- document.getElementById("placesContext")
- .removeChild(document.getElementById("placesContext_show:info"));
-
- ContentArea.focus();
- },
-
- - QueryInterface: function PO_QueryInterface(aIID) {
- - if (aIID.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([]),
-
- handleEvent: function PO_handleEvent(aEvent) {
- if (aEvent.type != "AppCommand")
- return;
-
- aEvent.stopPropagation();
- switch (aEvent.command) {
- case "Back":
- diff --git a/suite/components/places/content/treeView.js b/suite/components/places/content/treeView.js
- --- a/suite/components/places/content/treeView.js
- +++ b/suite/components/places/content/treeView.js
- @@ -53,17 +53,17 @@ PlacesTreeView.prototype = {
- __xulStore: null,
- get _xulStore() {
- if (!this.__xulStore) {
- this.__xulStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
- }
- return this.__xulStore;
- },
-
- - QueryInterface: XPCOMUtils.generateQI(PTV_interfaces),
- + QueryInterface: ChromeUtils.generateQI(PTV_interfaces),
-
- // Bug 761494:
- // ----------
- // Some addons use methods from nsINavHistoryResultObserver and
- // nsINavHistoryResultTreeViewer, without QIing to these interfaces first.
- // That's not a problem when the view is retrieved through the
- // <tree>.view getter (which returns the wrappedJSObject of this object),
- // it raises an issue when the view retrieved through the treeBoxObject.view
- diff --git a/suite/components/places/nsPlacesAutoComplete.js b/suite/components/places/nsPlacesAutoComplete.js
- --- a/suite/components/places/nsPlacesAutoComplete.js
- +++ b/suite/components/places/nsPlacesAutoComplete.js
- @@ -265,17 +265,17 @@ AutoCompleteStatementCallbackWrapper.pro
- {
- return this._handle = this._db.executeAsync(aQueries, aQueries.length,
- this);
- },
-
- //////////////////////////////////////////////////////////////////////////////
- //// nsISupports
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.mozIStorageStatementCallback,
- ])
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //// nsPlacesAutoComplete class
- //// @mozilla.org/autocomplete/search;1?name=history
-
- @@ -1303,17 +1303,17 @@ nsPlacesAutoComplete.prototype = {
-
- //////////////////////////////////////////////////////////////////////////////
- //// nsISupports
-
- classID: Components.ID("d0272978-beab-4adc-a3d4-04b76acfa4e7"),
-
- _xpcom_factory: XPCOMUtils.generateSingletonFactory(nsPlacesAutoComplete),
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsIAutoCompleteSearch,
- Ci.nsIAutoCompleteSimpleResultListener,
- Ci.mozIPlacesAutoComplete,
- Ci.mozIStorageStatementCallback,
- Ci.nsIObserver,
- Ci.nsISupportsWeakReference,
- ])
- };
- diff --git a/suite/components/places/tests/autocomplete/head_autocomplete.js b/suite/components/places/tests/autocomplete/head_autocomplete.js
- --- a/suite/components/places/tests/autocomplete/head_autocomplete.js
- +++ b/suite/components/places/tests/autocomplete/head_autocomplete.js
- @@ -33,17 +33,17 @@ AutoCompleteInput.prototype = {
- disableAutoComplete: false,
- completeDefaultIndex: false,
- get popup() { return this; },
- onSearchBegin: function() {},
- onSearchComplete: function() {},
- setSelectedIndex: function() {},
- get searchCount() { return this.searches.length; },
- getSearchAt: function(aIndex) { return this.searches[aIndex]; },
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsIAutoCompleteInput,
- Ci.nsIAutoCompletePopup,
- ])
- };
-
- function toURI(aSpec) {
- return uri(aSpec);
- }
- diff --git a/suite/components/places/tests/browser/browser_library_views_liveupdate.js b/suite/components/places/tests/browser/browser_library_views_liveupdate.js
- --- a/suite/components/places/tests/browser/browser_library_views_liveupdate.js
- +++ b/suite/components/places/tests/browser/browser_library_views_liveupdate.js
- @@ -143,17 +143,17 @@ function finishTest() {
- finish();
- }
-
- /**
- * 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: function() {},
- onItemAnnotationRemoved: function() {},
- onPageAnnotationSet: function() {},
- diff --git a/suite/components/places/tests/head_common.js b/suite/components/places/tests/head_common.js
- --- a/suite/components/places/tests/head_common.js
- +++ b/suite/components/places/tests/head_common.js
- @@ -747,17 +747,17 @@ function NavBookmarkObserver() {}
- NavBookmarkObserver.prototype = {
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onItemAdded: function () {},
- onItemRemoved: function () {},
- onItemChanged: function () {},
- onItemVisited: function () {},
- onItemMoved: function () {},
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsINavBookmarkObserver,
- ])
- };
-
- /**
- * Generic nsINavHistoryObserver that doesn't implement anything, but provides
- * dummy methods to prevent errors about an object not having a certain method.
- */
- @@ -767,17 +767,17 @@ NavHistoryObserver.prototype = {
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onVisit: function () {},
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsINavHistoryObserver,
- ])
- };
-
- /**
- * Generic nsINavHistoryResultObserver that doesn't implement anything, but
- * provides dummy methods to prevent errors about an object not having a certain
- * method.
- @@ -796,17 +796,17 @@ NavHistoryResultObserver.prototype = {
- nodeKeywordChanged: function () {},
- nodeLastModifiedChanged: function () {},
- nodeMoved: function () {},
- nodeRemoved: function () {},
- nodeTagsChanged: function () {},
- nodeTitleChanged: function () {},
- nodeURIChanged: function () {},
- sortingChanged: function () {},
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsINavHistoryResultObserver,
- ])
- };
-
- /**
- * Asynchronously check a url is visited.
- *
- * @param aURI The URI.
- diff --git a/suite/components/places/tests/unit/test_PUIU_makeTransaction.js b/suite/components/places/tests/unit/test_PUIU_makeTransaction.js
- --- a/suite/components/places/tests/unit/test_PUIU_makeTransaction.js
- +++ b/suite/components/places/tests/unit/test_PUIU_makeTransaction.js
- @@ -9,17 +9,17 @@ function waitForBookmarkNotification(aNo
- if (aMethodName == aNotification &&
- (!aProperty || aProperty == aData.property)) {
- PlacesUtils.bookmarks.removeObserver(this);
- aCallback(aData);
- }
- },
-
- // nsINavBookmarkObserver
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver]),
- onBeginUpdateBatch: function onBeginUpdateBatch() {
- return this.validate(arguments.callee.name, arguments);
- },
- onEndUpdateBatch: function onEndUpdateBatch() {
- return this.validate(arguments.callee.name, arguments);
- },
- onItemAdded: function onItemAdded(aItemId, aParentId, aIndex, aItemType,
- aURI, aTitle)
- diff --git a/suite/components/places/tests/unit/test_browserGlue_corrupt.js b/suite/components/places/tests/unit/test_browserGlue_corrupt.js
- --- a/suite/components/places/tests/unit/test_browserGlue_corrupt.js
- +++ b/suite/components/places/tests/unit/test_browserGlue_corrupt.js
- @@ -26,17 +26,17 @@ var bookmarksObserver = {
- if (anno.itemHasAnnotation(itemId, "Places/SmartBookmark"))
- continue_test();
- },
- onItemAdded: function() {},
- onItemRemoved: function(id, folder, index, itemType) {},
- onItemChanged: function() {},
- onItemVisited: function(id, visitID, time) {},
- onItemMoved: function() {},
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
-
- function run_test() {
- do_test_pending();
-
- // Create our bookmarks.html copying bookmarks.glue.html to the profile
- // folder. It should be ignored.
- create_bookmarks_html("bookmarks.glue.html");
- diff --git a/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js b/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js
- --- a/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js
- +++ b/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js
- @@ -26,17 +26,17 @@ var bookmarksObserver = {
- if (anno.itemHasAnnotation(itemId, "Places/SmartBookmark"))
- continue_test();
- },
- onItemAdded: function() {},
- onItemRemoved: function(id, folder, index, itemType) {},
- onItemChanged: function() {},
- onItemVisited: function(id, visitID, time) {},
- onItemMoved: function() {},
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
-
- function run_test() {
- do_test_pending();
-
- // Create bookmarks.html in the profile.
- create_bookmarks_html("bookmarks.glue.html");
- // Remove JSON backup from profile.
- diff --git a/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js b/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js
- --- a/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js
- +++ b/suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js
- @@ -26,17 +26,17 @@ var bookmarksObserver = {
- if (anno.itemHasAnnotation(itemId, "Places/SmartBookmark"))
- continue_test();
- },
- onItemAdded: function() {},
- onItemRemoved: function(id, folder, index, itemType) {},
- onItemChanged: function() {},
- onItemVisited: function(id, visitID, time) {},
- onItemMoved: function() {},
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
-
- function run_test() {
- do_test_pending();
-
- // Remove bookmarks.html from profile.
- remove_bookmarks_html();
- // Remove JSON backup from profile.
- diff --git a/suite/components/places/tests/unit/test_browserGlue_migrate.js b/suite/components/places/tests/unit/test_browserGlue_migrate.js
- --- a/suite/components/places/tests/unit/test_browserGlue_migrate.js
- +++ b/suite/components/places/tests/unit/test_browserGlue_migrate.js
- @@ -27,17 +27,17 @@ var bookmarksObserver = {
- if (anno.itemHasAnnotation(itemId, "Places/SmartBookmark"))
- continue_test();
- },
- onItemAdded: function() {},
- onItemRemoved: function(id, folder, index, itemType) {},
- onItemChanged: function() {},
- onItemVisited: function(id, visitID, time) {},
- onItemMoved: function() {},
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
-
- const PREF_SMART_BOOKMARKS_VERSION = "browser.places.smartBookmarksVersion";
-
- function run_test() {
- do_test_pending();
-
- // Create our bookmarks.html copying bookmarks.glue.html to the profile
- diff --git a/suite/components/places/tests/unit/test_browserGlue_restore.js b/suite/components/places/tests/unit/test_browserGlue_restore.js
- --- a/suite/components/places/tests/unit/test_browserGlue_restore.js
- +++ b/suite/components/places/tests/unit/test_browserGlue_restore.js
- @@ -26,17 +26,17 @@ var bookmarksObserver = {
- if (anno.itemHasAnnotation(itemId, "Places/SmartBookmark"))
- continue_test();
- },
- onItemAdded: function() {},
- onItemRemoved: function(id, folder, index, itemType) {},
- onItemChanged: function() {},
- onItemVisited: function(id, visitID, time) {},
- onItemMoved: function() {},
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
-
- function run_test() {
- do_test_pending();
-
- // Create our bookmarks.html copying bookmarks.glue.html to the profile
- // folder. It will be ignored.
- create_bookmarks_html("bookmarks.glue.html");
- diff --git a/suite/components/places/tests/unit/test_browserGlue_smartBookmarks.js b/suite/components/places/tests/unit/test_browserGlue_smartBookmarks.js
- --- a/suite/components/places/tests/unit/test_browserGlue_smartBookmarks.js
- +++ b/suite/components/places/tests/unit/test_browserGlue_smartBookmarks.js
- @@ -21,17 +21,17 @@ const SMART_BOOKMARKS_ANNO = "Places/Sma
- * exception generated when calling ensurePlacesDefaultQueriesInitialized().
- */
- function rebuildSmartBookmarks() {
- let consoleListener = {
- observe: function(aMsg) {
- print("Got console message: " + aMsg.message);
- },
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsIConsoleListener
- ]),
- };
- Services.console.reset();
- Services.console.registerListener(consoleListener);
- Cc["@mozilla.org/suite/suiteglue;1"].getService(Ci.nsISuiteGlue)
- .ensurePlacesDefaultQueriesInitialized();
- Services.console.unregisterListener(consoleListener);
- diff --git a/suite/components/pref/content/pref-applications.js b/suite/components/pref/content/pref-applications.js
- --- a/suite/components/pref/content/pref-applications.js
- +++ b/suite/components/pref/content/pref-applications.js
- @@ -402,17 +402,17 @@ FeedHandlerInfo.prototype = {
-
- // A minimal implementation of nsIMutableArray. It only supports the two
- // methods its callers invoke, namely appendElement, nsIArray::enumerate
- // and nsIArray::indexOf.
- this._possibleApplicationHandlers = {
- _inner: [],
- _removed: [],
-
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIMutableArray, Ci.nsIArray]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIMutableArray, Ci.nsIArray]),
-
- get length() {
- return this._inner.length;
- },
-
- enumerate: function() {
- return new ArrayEnumerator(this._inner);
- },
- @@ -759,17 +759,17 @@ var gApplicationsPane = {
- Services.prefs.removeObserver(PREF_AUDIO_FEED_SELECTED_WEB, this);
- Services.prefs.removeObserver(PREF_AUDIO_FEED_SELECTED_ACTION, this);
- },
-
-
- //**************************************************************************//
- // nsISupports
-
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
-
- //**************************************************************************//
- // nsIObserver
-
- observe(aSubject, aTopic, aData) {
- // Rebuild the list when there are changes to preferences that influence
- // whether or not to show certain entries in the list.
- if (aTopic == "nsPref:changed" && !this._storingAction) {
- diff --git a/suite/components/pref/content/pref-cache.js b/suite/components/pref/content/pref-cache.js
- --- a/suite/components/pref/content/pref-cache.js
- +++ b/suite/components/pref/content/pref-cache.js
- @@ -23,17 +23,17 @@ var CacheObserver = {
- var sizeStrings = DownloadUtils.convertByteUnits(aConsumption);
- var prefStrBundle = document.getElementById("bundle_prefutilities");
- var sizeStr = prefStrBundle.getFormattedString("cacheSizeInfo",
- sizeStrings);
- actualSizeLabel.textContent = sizeStr;
- },
-
- /* nsISupports */
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsICacheStorageConsumptionObserver,
- Ci.nsISupportsWeakReference])
- };
-
- // because the cache is in kilobytes, and the UI is in megabytes.
- function ReadCacheDiskCapacity()
- {
- var pref = document.getElementById("browser.cache.disk.capacity");
- diff --git a/suite/components/search/content/search-panel.js b/suite/components/search/content/search-panel.js
- --- a/suite/components/search/content/search-panel.js
- +++ b/suite/components/search/content/search-panel.js
- @@ -68,18 +68,18 @@ function doSearch() {
- }
-
- var where = Services.prefs.getBoolPref("browser.search.openintab") ? "tab" : "current";
- var submission = Services.search.currentEngine.getSubmission(textValue);
- openUILinkIn(submission.uri.spec, where, null, submission.postData);
- }
-
- var engineObserver = {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsISupportsWeakReference]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsISupportsWeakReference]),
-
- observe: function(aEngine, aTopic, aVerb) {
- if (aTopic == SEARCH_ENGINE_TOPIC) {
- // Right now, always just rebuild the list after any modification.
- LoadEngineList();
- }
- }
- }
- diff --git a/suite/components/sessionstore/nsSessionStartup.js b/suite/components/sessionstore/nsSessionStartup.js
- --- a/suite/components/sessionstore/nsSessionStartup.js
- +++ b/suite/components/sessionstore/nsSessionStartup.js
- @@ -207,16 +207,16 @@ SessionStartup.prototype = {
- return content.replace(/\r\n?/g, "\n");
- }
- catch (ex) { Cu.reportError(ex); }
-
- return null;
- },
-
- /* ........ QueryInterface .............. */
- - QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
- - Ci.nsISupportsWeakReference,
- - Ci.nsISessionStartup]),
- + QueryInterface : ChromeUtils.generateQI([Ci.nsIObserver,
- + Ci.nsISupportsWeakReference,
- + Ci.nsISessionStartup]),
- classID: Components.ID("{4e6c1112-57b6-44ba-adf9-99fb573b0a30}")
-
- };
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([SessionStartup]);
- diff --git a/suite/components/sessionstore/nsSessionStore.js b/suite/components/sessionstore/nsSessionStore.js
- --- a/suite/components/sessionstore/nsSessionStore.js
- +++ b/suite/components/sessionstore/nsSessionStore.js
- @@ -117,19 +117,19 @@ function SessionStoreService() {
- // get crash recovery state from prefs and allow for proper reaction to state changes
- this._prefBranch.addObserver("sessionstore.resume_from_crash", this, true);
- return this._prefBranch.getBoolPref("sessionstore.resume_from_crash");
- });
- }
-
- SessionStoreService.prototype = {
- classID: Components.ID("{d37ccdf1-496f-4135-9575-037180af010d}"),
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsISessionStore,
- - Ci.nsIObserver,
- - Ci.nsISupportsWeakReference]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsISessionStore,
- + Ci.nsIObserver,
- + Ci.nsISupportsWeakReference]),
-
- // xul:tab attributes to (re)store (extensions might want to hook in here);
- // the favicon is always saved for the about:sessionrestore page
- xulAttributes: {"image": true},
-
- // set default load state
- _loadState: STATE_STOPPED,
-
- @@ -4144,18 +4144,18 @@ var gRestoreTabsProgressListener = {
- // restored. We need to catch reloads that occur before the tab is restored
- // because otherwise, docShell will reload an old URI (usually about:blank).
- function SessionStoreSHistoryListener(ss, aTab) {
- this.tab = aTab;
- this.ss = ss;
- }
-
- SessionStoreSHistoryListener.prototype = {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsISHistoryListener,
- - Ci.nsISupportsWeakReference]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsISHistoryListener,
- + Ci.nsISupportsWeakReference]),
- browser: null,
- ss: null,
- tab: null,
- OnHistoryNewEntry: function(aNewURI) { },
- OnHistoryGotoIndex: function(aIndex, aGotoURI) { },
- OnHistoryPurge: function(aNumEntries) { },
- OnHistoryReload: function(aReloadURI, aReloadFlags) {
- // On reload, we want to make sure that session history loads the right
- diff --git a/suite/components/shell/nsSetDefault.js b/suite/components/shell/nsSetDefault.js
- --- a/suite/components/shell/nsSetDefault.js
- +++ b/suite/components/shell/nsSetDefault.js
- @@ -41,13 +41,13 @@ nsSetDefault.prototype = {
- },
-
- helpInfo: " -setDefaultBrowser Set this app as the default browser client.\n" +
- " -setDefaultMail Set this app as the default mail client.\n" +
- " -setDefaultNews Set this app as the default newsreader.\n" +
- " -setDefaultFeed Set this app as the default feedreader.\n",
-
- classID: Components.ID("{a3d5b950-690a-491f-a881-2c2cdcd241cb}"),
- - QueryInterface: XPCOMUtils.generateQI([nsICommandLineHandler])
- + QueryInterface: ChromeUtils.generateQI([nsICommandLineHandler])
- }
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSetDefault]);
-
- diff --git a/suite/components/sidebar/nsSidebar.js b/suite/components/sidebar/nsSidebar.js
- --- a/suite/components/sidebar/nsSidebar.js
- +++ b/suite/components/sidebar/nsSidebar.js
- @@ -294,17 +294,17 @@ function (aSearchURL)
- nsSidebar.prototype.classInfo = XPCOMUtils.generateCI({
- classID: SIDEBAR_CID,
- contractID: SIDEBAR_CONTRACTID,
- classDescription: "Sidebar",
- interfaces: [nsISidebar],
- flags: nsIClassInfo.DOM_OBJECT});
-
- nsSidebar.prototype.QueryInterface =
- - XPCOMUtils.generateQI([nsISidebar]);
- + ChromeUtils.generateQI([Ci.nsISidebar]);
-
- nsSidebar.prototype.classID = SIDEBAR_CID;
-
- var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSidebar]);
-
- var gDebugLog;
-
- /* static functions */
- diff --git a/suite/components/sync/content/syncSetup.js b/suite/components/sync/content/syncSetup.js
- --- a/suite/components/sync/content/syncSetup.js
- +++ b/suite/components/sync/content/syncSetup.js
- @@ -20,18 +20,18 @@ const SETUP_SUCCESS_PAGE = 8;
- const RECAPTCHA_DOMAIN = "https://www.google.com";
-
- const {Weave} = ChromeUtils.import("resource://services-sync/main.js");
- var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
- const {PlacesUtils} = ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
- const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-
- var gSyncSetup = {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
- - Ci.nsISupportsWeakReference]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference]),
-
- captchaBrowser: null,
- wizard: null,
- _disabledSites: [],
-
- status: {
- password: false,
- email: false,
- diff --git a/suite/components/sync/content/syncUI.js b/suite/components/sync/content/syncUI.js
- --- a/suite/components/sync/content/syncUI.js
- +++ b/suite/components/sync/content/syncUI.js
- @@ -436,17 +436,17 @@ var gSyncUI = {
- this.initNotifications();
- break;
- case "weave:ui:clear-error":
- this.clearError();
- break;
- }
- },
-
- - QueryInterface: XPCOMUtils.generateQI([
- + QueryInterface: ChromeUtils.generateQI([
- Ci.nsIObserver,
- Ci.nsISupportsWeakReference
- ])
- };
-
- XPCOMUtils.defineLazyGetter(gSyncUI, "_stringBundle", function() {
- //XXXzpao these strings should probably be moved from /services to /browser... (bug 583381)
- // but for now just make it work
- diff --git a/suite/components/tests/browser/browser_markPageAsFollowedLink.js b/suite/components/tests/browser/browser_markPageAsFollowedLink.js
- --- a/suite/components/tests/browser/browser_markPageAsFollowedLink.js
- +++ b/suite/components/tests/browser/browser_markPageAsFollowedLink.js
- @@ -25,17 +25,17 @@ var observer = {
- maybeClickLink();
- }
- else if (url == RIGHT_URL ) {
- is(getTransitionForUrl(url), PlacesUtils.history.TRANSITION_FRAMED_LINK,
- "User activated visits should get a FRAMED_LINK transition.");
- finish();
- }
- },
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver])
- };
- Services.obs.addObserver(observer, "uri-visit-saved");
-
- function test()
- {
- waitForExplicitFinish();
- gBrowser.selectedTab = gBrowser.addTab(PAGE_URL);
- let frameCount = 0;
- diff --git a/suite/extensions/debugQA/content/debugQAEditorOverlay.js b/suite/extensions/debugQA/content/debugQAEditorOverlay.js
- --- a/suite/extensions/debugQA/content/debugQAEditorOverlay.js
- +++ b/suite/extensions/debugQA/content/debugQAEditorOverlay.js
- @@ -153,24 +153,17 @@ sampleJSTransaction.prototype = {
-
- merge: function(aTxn)
- {
- // We don't do any merging!
-
- return false;
- },
-
- - QueryInterface: function(aIID, theResult)
- - {
- - if (aIID.equals(Ci.nsITransaction) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsITransaction]),
-
- insert_node_at_point: function(node, container, offset)
- {
- var childList = container.childNodes;
-
- if (childList.length == 0 || offset >= childList.length)
- container.appendChild(node);
- else
- diff --git a/suite/mailnews/components/compose/content/MsgComposeCommands.js b/suite/mailnews/components/compose/content/MsgComposeCommands.js
- --- a/suite/mailnews/components/compose/content/MsgComposeCommands.js
- +++ b/suite/mailnews/components/compose/content/MsgComposeCommands.js
- @@ -448,25 +448,18 @@ var progressListener = {
- } catch (ex) {}
- },
-
- onSecurityChange: function(aWebProgress, aRequest, state)
- {
- // we can ignore this notification
- },
-
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIWebProgressListener) ||
- - iid.equals(Ci.nsISupportsWeakReference) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference]),
- };
-
- var defaultController =
- {
- supportsCommand: function(command)
- {
- switch (command)
- {
- @@ -2920,25 +2913,18 @@ function OpenSelectedAttachment()
- }
-
- function nsAttachmentOpener()
- {
- }
-
- nsAttachmentOpener.prototype =
- {
- - QueryInterface: function(iid)
- - {
- - if (iid.equals(Ci.nsIURIContentListener) ||
- - iid.equals(Ci.nsIInterfaceRequestor) ||
- - iid.equals(Ci.nsISupports)) {
- - return this;
- - }
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIURIContentListener,
- + Ci.nsIInterfaceRequestor]),
-
- doContent: function(contentType, isContentPreferred, request, contentHandler)
- {
- return false;
- },
-
- isPreferred: function(contentType, desiredContentType)
- {
- diff --git a/suite/mailnews/components/compose/content/addressingWidgetOverlay.js b/suite/mailnews/components/compose/content/addressingWidgetOverlay.js
- --- a/suite/mailnews/components/compose/content/addressingWidgetOverlay.js
- +++ b/suite/mailnews/components/compose/content/addressingWidgetOverlay.js
- @@ -1152,16 +1152,10 @@ AutomatedAutoCompleteHandler.prototype =
-
- // that will automatically set the focus on a new available row, and make sure it is visible
- awAddRecipient(this.recipientType ? this.recipientType : "addr_to", addressToAdd);
-
- this.indexIntoNames++;
- this.autoCompleteNextAddress();
- },
-
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIAutoCompleteListener) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIAutoCompleteListener]),
- }
- diff --git a/suite/mailnews/content/SearchDialog.js b/suite/mailnews/content/SearchDialog.js
- --- a/suite/mailnews/content/SearchDialog.js
- +++ b/suite/mailnews/content/SearchDialog.js
- @@ -498,24 +498,17 @@ nsMsgSearchCommandUpdater.prototype =
-
- updateNextMessageAfterDelete : function()
- {
- SetNextMessageAfterDelete();
- },
-
- summarizeSelection: function() {return false},
-
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIMsgDBViewCommandUpdater) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgDBViewCommandUpdater]),
- }
-
- function setupDatasource() {
- gDBView = Cc["@mozilla.org/messenger/msgdbview;1?type=search"]
- .createInstance(Ci.nsIMsgDBView);
- var count = new Object;
- var cmdupdator = new nsMsgSearchCommandUpdater();
-
- diff --git a/suite/mailnews/content/browserRequest.js b/suite/mailnews/content/browserRequest.js
- --- a/suite/mailnews/content/browserRequest.js
- +++ b/suite/mailnews/content/browserRequest.js
- @@ -7,23 +7,18 @@ const wpl = Ci.nsIWebProgressListener;
-
- var reporterListener = {
- _isBusy: false,
- get securityButton() {
- delete this.securityButton;
- return this.securityButton = document.getElementById("security-button");
- },
-
- - QueryInterface: function(aIID) {
- - if (aIID.equals(Ci.nsIWebProgressListener) ||
- - aIID.equals(Ci.nsISupportsWeakReference) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
- + Ci.nsISupportsWeakReference]),
-
- onStateChange: function(/*in nsIWebProgress*/ aWebProgress,
- /*in nsIRequest*/ aRequest,
- /*in unsigned long*/ aStateFlags,
- /*in nsresult*/ aStatus) {
- },
-
- onProgressChange: function(/*in nsIWebProgress*/ aWebProgress,
- diff --git a/suite/mailnews/content/mailTasksOverlay.js b/suite/mailnews/content/mailTasksOverlay.js
- --- a/suite/mailnews/content/mailTasksOverlay.js
- +++ b/suite/mailnews/content/mailTasksOverlay.js
- @@ -223,23 +223,18 @@ nsMsgBadCertHandler.prototype = {
- },
-
- // nsIInterfaceRequestor
- getInterface: function(iid) {
- return this.QueryInterface(iid);
- },
-
- // nsISupports
- - QueryInterface: function(iid) {
- - if (!iid.equals(Ci.nsIBadCertListener2) &&
- - !iid.equals(Ci.nsIInterfaceRequestor) &&
- - !iid.equals(Ci.nsISupports))
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - return this;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIBadCertListener2,
- + Ci.nsIInterfaceRequestor]),
- };
-
- function InformUserOfCertError(status, targetSite)
- {
- var params = { exceptionAdded : false,
- sslStatus : status,
- prefetchCert : true,
- location : targetSite };
- diff --git a/suite/mailnews/content/mailWindow.js b/suite/mailnews/content/mailWindow.js
- --- a/suite/mailnews/content/mailWindow.js
- +++ b/suite/mailnews/content/mailWindow.js
- @@ -371,25 +371,19 @@ nsMsgStatusFeedback.prototype =
- },
-
- // Called before links are navigated to to allow us to retarget them if needed.
- onBeforeLinkTraversal: function(aOriginalTarget, aLinkURI, aLinkNode, aIsAppTab)
- {
- return aOriginalTarget;
- },
-
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIMsgStatusFeedback) ||
- - iid.equals(Ci.nsIXULBrowserWindow) ||
- - iid.equals(Ci.nsISupportsWeakReference) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgStatusFeedback,
- + Ci.nsIXULBrowserWindow,
- + Ci.nsISupportsWeakReference]),
-
- // nsIMsgStatusFeedback implementation.
- showStatusString : function(statusText)
- {
- this.ensureStatusFields();
- if ( !statusText.length )
- statusText = this.myDefaultStatus;
- else
- @@ -495,23 +489,17 @@ nsMsgStatusFeedback.prototype =
-
-
- function nsMsgWindowCommands()
- {
- }
-
- nsMsgWindowCommands.prototype =
- {
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIMsgWindowCommands) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_NOINTERFACE;
- - },
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgWindowCommands]),
-
- selectFolder: function(folderUri)
- {
- gFolderTreeView.selectFolder(MailUtils.getFolderForURI(folderUri));
- },
-
- selectMessage: function(messageUri)
- {
- diff --git a/suite/mailnews/content/mailWindowOverlay.js b/suite/mailnews/content/mailWindowOverlay.js
- --- a/suite/mailnews/content/mailWindowOverlay.js
- +++ b/suite/mailnews/content/mailWindowOverlay.js
- @@ -1197,25 +1197,20 @@ BatchMessageMover.prototype =
- if (aFolder.parent == this._dstFolderParent &&
- aFolder.name == this._dstFolderName) {
- this._dstFolderParent = null;
- this._dstFolderName = null;
- this.continueBatch();
- }
- },
-
- - QueryInterface(aIID) {
- - if (aIID.equals(Ci.nsIUrlListener) ||
- - aIID.equals(Ci.nsIMsgCopyServiceListener) ||
- - aIID.equals(Ci.nsIMsgFolderListener) ||
- - aIID.equals(Ci.nsIMsgOperationListener) ||
- - aIID.equals(Ci.nsISupports))
- - return this;
- - throw Cr.NS_ERROR_NO_INTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIUrlListener,
- + Ci.nsIMsgCopyServiceListener,
- + Ci.nsIMsgFolderListener,
- + Ci.nsIMsgOperationListener]),
- }
-
- function MsgArchiveSelectedMessages(aEvent) {
- let batchMover = new BatchMessageMover();
- batchMover.archiveMessages(gFolderDisplay.selectedMessages);
- }
-
-
- diff --git a/suite/mailnews/content/messageWindow.js b/suite/mailnews/content/messageWindow.js
- --- a/suite/mailnews/content/messageWindow.js
- +++ b/suite/mailnews/content/messageWindow.js
- @@ -153,24 +153,17 @@ nsMsgDBViewCommandUpdater.prototype =
-
- updateNextMessageAfterDelete : function()
- {
- SetNextMessageAfterDelete();
- },
-
- summarizeSelection: function() {return false},
-
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIMsgDBViewCommandUpdater) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgDBViewCommandUpdater]),
- }
-
- function HandleDeleteOrMoveMsgCompleted(folder)
- {
- if ((folder.URI == gCurrentFolderUri) && gCurrentMessageIsDeleted)
- {
- gDBView.onDeleteCompleted(true);
- gCurrentMessageIsDeleted = false;
- diff --git a/suite/mailnews/content/msgHdrViewOverlay.js b/suite/mailnews/content/msgHdrViewOverlay.js
- --- a/suite/mailnews/content/msgHdrViewOverlay.js
- +++ b/suite/mailnews/content/msgHdrViewOverlay.js
- @@ -316,17 +316,17 @@ function OnAddressBookDataChanged(aActio
- }
- });
- }
-
- // The messageHeaderSink is the class that gets notified of a message's headers as we display the message
- // through our mime converter.
-
- var messageHeaderSink = {
- - QueryInterface: XPCOMUtils.generateQI(
- + QueryInterface: ChromeUtils.generateQI(
- [Ci.nsIMsgHeaderSink]),
- onStartHeaders: function()
- {
- this.mSaveHdr = null;
- // clear out any pending collected address timers...
- if (gCollectAddressTimer)
- {
- clearTimeout(gCollectAddressTimer);
- @@ -1883,17 +1883,17 @@ var attachmentAreaDNDObserver = {
- };
-
- function nsFlavorDataProvider()
- {
- }
-
- nsFlavorDataProvider.prototype =
- {
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsIFlavorDataProvider]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIFlavorDataProvider]),
-
- getFlavorData : function(aTransferable, aFlavor, aData, aDataLen)
- {
- // get the url for the attachment
- if (aFlavor == "application/x-moz-file-promise")
- {
- var urlPrimitive = { };
- var dataSize = { };
- diff --git a/suite/mailnews/content/threadPane.js b/suite/mailnews/content/threadPane.js
- --- a/suite/mailnews/content/threadPane.js
- +++ b/suite/mailnews/content/threadPane.js
- @@ -96,24 +96,17 @@ nsMsgDBViewCommandUpdater.prototype =
-
- updateNextMessageAfterDelete : function()
- {
- SetNextMessageAfterDelete();
- },
-
- summarizeSelection: function() {return false},
-
- - QueryInterface : function(iid)
- - {
- - if (iid.equals(Ci.nsIMsgDBViewCommandUpdater) ||
- - iid.equals(Ci.nsISupports))
- - return this;
- -
- - throw Cr.NS_NOINTERFACE;
- - }
- + QueryInterface: ChromeUtils.generateQI([Ci.nsIMsgDBViewCommandUpdater]),
- }
-
- function HandleColumnClick(columnID)
- {
- const columnMap = {dateCol: 'byDate',
- receivedCol: 'byReceived',
- senderCol: 'byAuthor',
- recipientCol: 'byRecipient',
- diff --git a/suite/modules/WindowsPreviewPerTab.jsm b/suite/modules/WindowsPreviewPerTab.jsm
- --- a/suite/modules/WindowsPreviewPerTab.jsm
- +++ b/suite/modules/WindowsPreviewPerTab.jsm
- @@ -154,17 +154,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]),
-
- _cachedWidth: 0,
- _cachedHeight: 0,
-
- destroy: function () {
- this.tab.removeEventListener("TabAttrModified", this);
-
- // Break cycles, otherwise we end up leaking the window with everything
- @@ -849,19 +849,19 @@ var AeroPeek = {
- if (tab.getAttribute("image") == newValue) {
- win.onLinkIconAvailable(tab.linkedBrowser, newValue);
- }
- }
- }
- }
- },
-
- - QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
- - Ci.nsINavHistoryObserver,
- - Ci.nsIObserver]),
- + QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference,
- + Ci.nsINavHistoryObserver,
- + Ci.nsIObserver]),
- };
-
- XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", () =>
- Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer)
- );
-
- XPCOMUtils.defineLazyServiceGetter(AeroPeek, "prefs",
- "@mozilla.org/preferences-service;1",
|