зеркало из https://github.com/mozilla/pjs.git
Bug 172846 QueryInterface should not throw Components.results.NS_NOINTERFACE for Components.interfaces.nsISupports
r=caillon sr=bz
This commit is contained in:
Родитель
b869372029
Коммит
f1ea69808e
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -49,7 +49,8 @@ nsCommandHandler.prototype =
|
|||
{
|
||||
QueryInterface : function(iid)
|
||||
{
|
||||
if (iid.equals(Components.interfaces.nsICommandHandler))
|
||||
if (iid.equals(Components.interfaces.nsICommandHandler) ||
|
||||
iid.equals(Components.interfaces.nsISupports))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -84,12 +84,10 @@ 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();
|
||||
}
|
||||
},
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -154,11 +154,11 @@ nsMsgDBViewCommandUpdater.prototype =
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -85,7 +85,9 @@ var gPrintPreviewObs = {
|
|||
|
||||
QueryInterface : function(iid)
|
||||
{
|
||||
if (iid.equals(Components.interfaces.nsIObserver) || iid.equals(Components.interfaces.nsISupportsWeakReference))
|
||||
if (iid.equals(Components.interfaces.nsIObserver) ||
|
||||
iid.equals(Components.interfaces.nsISupportsWeakReference) ||
|
||||
iid.equals(Components.interfaces.nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_NOINTERFACE;
|
||||
|
|
|
@ -86,11 +86,11 @@ nsMsgDBViewCommandUpdater.prototype =
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -451,11 +451,11 @@ nsMsgSearchCommandUpdater.prototype =
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -343,7 +343,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;
|
||||
|
|
|
@ -116,7 +116,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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче