Bug 172846 QueryInterface should not throw Components.results.NS_NOINTERFACE for Components.interfaces.nsISupports

r=caillon sr=bz
This commit is contained in:
timeless%mac.com 2002-10-06 23:14:25 +00:00
Родитель b869372029
Коммит f1ea69808e
13 изменённых файлов: 79 добавлений и 62 удалений

Просмотреть файл

@ -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;