diff --git a/calendar/resources/content/attachFile.js b/calendar/resources/content/attachFile.js index 81ac63d0123..1e87c173e80 100644 --- a/calendar/resources/content/attachFile.js +++ b/calendar/resources/content/attachFile.js @@ -326,7 +326,9 @@ var progressListener = { QueryInterface : function(iid) { - if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) + if (iid.equals(Components.interfaces.nsIWebProgressListener) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; diff --git a/calendar/resources/content/calendarEventDialogAttachFile.js b/calendar/resources/content/calendarEventDialogAttachFile.js index 81ac63d0123..1e87c173e80 100644 --- a/calendar/resources/content/calendarEventDialogAttachFile.js +++ b/calendar/resources/content/calendarEventDialogAttachFile.js @@ -326,7 +326,9 @@ var progressListener = { QueryInterface : function(iid) { - if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) + if (iid.equals(Components.interfaces.nsIWebProgressListener) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; diff --git a/embedding/browser/chrome/content/mini-nav.js b/embedding/browser/chrome/content/mini-nav.js index b95c6779505..6c74dcb8b58 100644 --- a/embedding/browser/chrome/content/mini-nav.js +++ b/embedding/browser/chrome/content/mini-nav.js @@ -48,21 +48,22 @@ function nsCommandHandler() nsCommandHandler.prototype = { QueryInterface : function(iid) + { + if (iid.equals(Components.interfaces.nsICommandHandler) || + iid.equals(Components.interfaces.nsISupports)) { - if (iid.equals(Components.interfaces.nsICommandHandler)) - { - return this; - } - throw Components.results.NS_NOINTERFACE; - }, + return this; + } + throw Components.results.NS_NOINTERFACE; + }, - exec : function(command, params) - { - }, - query : function(command, params, result) - { - result = ""; - } + exec : function(command, params) + { + }, + query : function(command, params, result) + { + result = ""; + } } // @@ -77,8 +78,11 @@ nsBrowserStatusHandler.prototype = QueryInterface : function(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || - aIID.equals(Components.interfaces.nsISupportsWeakReference)) + aIID.equals(Components.interfaces.nsISupportsWeakReference) || + aIID.equals(Components.interfaces.nsISupports)) + { return this; + } throw Components.results.NS_NOINTERFACE; }, diff --git a/embedding/components/ui/progressDlg/nsProgressDlg.js b/embedding/components/ui/progressDlg/nsProgressDlg.js index e319b53b185..1468378e3ae 100644 --- a/embedding/components/ui/progressDlg/nsProgressDlg.js +++ b/embedding/components/ui/progressDlg/nsProgressDlg.js @@ -224,7 +224,9 @@ var progressListener = { }, QueryInterface : function(iid) { - if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) + if (iid.equals(Components.interfaces.nsIWebProgressListener) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; diff --git a/js/src/xpconnect/tests/js/old/xpctest_observer.js b/js/src/xpconnect/tests/js/old/xpctest_observer.js index b6ec5e432c9..2a4c902bd44 100644 --- a/js/src/xpconnect/tests/js/old/xpctest_observer.js +++ b/js/src/xpconnect/tests/js/old/xpctest_observer.js @@ -8,7 +8,8 @@ var observer1 = { print("observer1 notified for: "+aTopic+" with: "+someData); }, QueryInterface: function (iid) { - if (iid.equals(Components.interfaces.nsISupportsWeakReference)) { + if (iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) { return this; } throw Components.results.NS_ERROR_NO_INTERFACE; diff --git a/mailnews/addrbook/prefs/resources/content/replicationProgress.js b/mailnews/addrbook/prefs/resources/content/replicationProgress.js index 69ae5df7157..81c89c762cc 100644 --- a/mailnews/addrbook/prefs/resources/content/replicationProgress.js +++ b/mailnews/addrbook/prefs/resources/content/replicationProgress.js @@ -84,18 +84,16 @@ var progressListener = { gProgressMeter.setAttribute("mode","normal"); gProgressMeter.setAttribute("value", "100"); - if (aStatus) { + if (aStatus) SetProgressText(gReplicationBundle.getString("replicationSucceeded")); - } - else { + else SetProgressText(gReplicationBundle.getString("replicationFailed")); - } window.close(); } }, onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { - SetProgressText(gReplicationBundle.getFormattedString("currentCount", [aCurSelfProgress])); + SetProgressText(gReplicationBundle.getFormattedString("currentCount", [aCurSelfProgress])); }, onLocationChange: function(aWebProgress, aRequest, aLocation) { @@ -109,7 +107,8 @@ var progressListener = { QueryInterface : function(iid) { if (iid.equals(Components.interfaces.nsIWebProgressListener) || - iid.equals(Components.interfaces.nsISupportsWeakReference)) + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; } diff --git a/mailnews/base/resources/content/mailWindow.js b/mailnews/base/resources/content/mailWindow.js index fc89958a8bd..53877ce9453 100644 --- a/mailnews/base/resources/content/mailWindow.js +++ b/mailnews/base/resources/content/mailWindow.js @@ -283,7 +283,8 @@ nsMsgStatusFeedback.prototype = QueryInterface : function(iid) { if (iid.equals(Components.interfaces.nsIMsgStatusFeedback) || - iid.equals(Components.interfaces.nsIXULBrowserWindow)) + iid.equals(Components.interfaces.nsIXULBrowserWindow) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; }, @@ -395,10 +396,10 @@ nsMsgWindowCommands.prototype = { QueryInterface : function(iid) { - if(iid.equals(Components.interfaces.nsIMsgWindowCommands)) + if (iid.equals(Components.interfaces.nsIMsgWindowCommands) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; - return null; }, SelectFolder: function(folderUri) { @@ -419,10 +420,10 @@ nsMessagePaneController.prototype = { QueryInterface : function(iid) { - if(iid.equals(Components.interfaces.nsIMsgMessagePaneController)) + if (iid.equals(Components.interfaces.nsIMsgMessagePaneController) || + iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; - return null; }, clearMsgPane: function() { diff --git a/mailnews/base/resources/content/messageWindow.js b/mailnews/base/resources/content/messageWindow.js index 845d0b437d2..7bd22d19a65 100644 --- a/mailnews/base/resources/content/messageWindow.js +++ b/mailnews/base/resources/content/messageWindow.js @@ -154,11 +154,11 @@ nsMsgDBViewCommandUpdater.prototype = QueryInterface : function(iid) { - if(iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater)) - return this; + if (iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater) || + iid.equals(Components.interfaces.nsISupports)) + return this; throw Components.results.NS_NOINTERFACE; - return null; } } diff --git a/mailnews/base/resources/content/msgPrintEngine.js b/mailnews/base/resources/content/msgPrintEngine.js index c75bc9ae7c2..d521a3ead2d 100644 --- a/mailnews/base/resources/content/msgPrintEngine.js +++ b/mailnews/base/resources/content/msgPrintEngine.js @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of @@ -78,18 +78,20 @@ function BrowserExitPrintPreview() // This observer is called once the progress dialog has been "opened" var gPrintPreviewObs = { - observe: function(aSubject, aTopic, aData) - { - setTimeout(FinishPrintPreview, 0); - }, + observe: function(aSubject, aTopic, aData) + { + setTimeout(FinishPrintPreview, 0); + }, - QueryInterface : function(iid) - { - if (iid.equals(Components.interfaces.nsIObserver) || iid.equals(Components.interfaces.nsISupportsWeakReference)) + QueryInterface : function(iid) + { + if (iid.equals(Components.interfaces.nsIObserver) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) return this; - - throw Components.results.NS_NOINTERFACE; - } + + throw Components.results.NS_NOINTERFACE; + } }; function getBundle(aURI) diff --git a/mailnews/base/resources/content/threadPane.js b/mailnews/base/resources/content/threadPane.js index 784dd1a64db..863205d7ec4 100644 --- a/mailnews/base/resources/content/threadPane.js +++ b/mailnews/base/resources/content/threadPane.js @@ -86,11 +86,11 @@ nsMsgDBViewCommandUpdater.prototype = QueryInterface : function(iid) { - if(iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater)) - return this; + if (iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater) || + iid.equals(Components.interfaces.nsISupports)) + return this; throw Components.results.NS_NOINTERFACE; - return null; } } diff --git a/mailnews/base/search/resources/content/SearchDialog.js b/mailnews/base/search/resources/content/SearchDialog.js index ad90b44cbe0..6d0f0414299 100644 --- a/mailnews/base/search/resources/content/SearchDialog.js +++ b/mailnews/base/search/resources/content/SearchDialog.js @@ -440,23 +440,23 @@ function nsMsgSearchCommandUpdater() nsMsgSearchCommandUpdater.prototype = { updateCommandStatus : function() - { - // the back end is smart and is only telling us to update command status - // when the # of items in the selection has actually changed. - document.commandDispatcher.updateCommands('mail-search'); - }, + { + // the back end is smart and is only telling us to update command status + // when the # of items in the selection has actually changed. + document.commandDispatcher.updateCommands('mail-search'); + }, displayMessageChanged : function(aFolder, aSubject, aKeywords) { }, QueryInterface : function(iid) - { - if(iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater)) + { + if (iid.equals(Components.interfaces.nsIMsgDBViewCommandUpdater) || + iid.equals(Components.interfaces.nsISupports)) return this; - throw Components.results.NS_NOINTERFACE; - return null; - } + throw Components.results.NS_NOINTERFACE; + } } function setupDatasource() { diff --git a/mailnews/compose/resources/content/MsgComposeCommands.js b/mailnews/compose/resources/content/MsgComposeCommands.js index 80ee5d665ab..4ecdd646038 100644 --- a/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mailnews/compose/resources/content/MsgComposeCommands.js @@ -343,10 +343,12 @@ var progressListener = { QueryInterface : function(iid) { - if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) - return this; + if (iid.equals(Components.interfaces.nsIWebProgressListener) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) + return this; - throw Components.results.NS_NOINTERFACE; + throw Components.results.NS_NOINTERFACE; } }; diff --git a/mailnews/compose/resources/content/sendProgress.js b/mailnews/compose/resources/content/sendProgress.js index 050cc6de524..cd45a2640f6 100644 --- a/mailnews/compose/resources/content/sendProgress.js +++ b/mailnews/compose/resources/content/sendProgress.js @@ -116,10 +116,12 @@ var progressListener = { QueryInterface : function(iid) { - if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference)) - return this; + if (iid.equals(Components.interfaces.nsIWebProgressListener) || + iid.equals(Components.interfaces.nsISupportsWeakReference) || + iid.equals(Components.interfaces.nsISupports)) + return this; - throw Components.results.NS_NOINTERFACE; + throw Components.results.NS_NOINTERFACE; } };