Bug 373393 - ASSERTION: Lying nsIInterfaceRequestor implementation! (mozilla/content/base/src/nsXMLHttpRequest.cpp)

fix by switching the getInterface implementation from setting Components.returnCode to throwing when an interface is not supported. Components.returnCode is currently broken (see bug 287107), and it's not clear when it gets fixed. The assertion is annoying and the original intent of returnCode was to use it for success codes anyway.

r=gavin
This commit is contained in:
asqueella%gmail.com 2007-03-15 21:51:48 +00:00
Родитель 6fd1409672
Коммит 78cc6d3221
2 изменённых файлов: 2 добавлений и 8 удалений

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

@ -97,12 +97,7 @@ BadCertHandler.prototype = {
// nsIInterfaceRequestor
getInterface: function(iid) {
if (iid.equals(Components.interfaces.nsIBadCertListener) ||
iid.equals(Components.interfaces.nsIChannelEventSink))
return this;
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
return null;
return this.QueryInterface(iid);
},
// nsISupports

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

@ -2572,8 +2572,7 @@ Downloader.prototype = {
createInstance();
return prompt.QueryInterface(iid);
}
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
return null;
throw Components.results.NS_ERROR_NO_INTERFACE;
},
/**