Bug 529952: fix error console spew on gmail due to bad assumption about nsIRequests all being nsIChannels, r=dietrich

This commit is contained in:
Gavin Sharp 2009-11-23 13:46:25 -05:00
parent dded2d11a0
commit ccf1116b55

View File

@ -4326,9 +4326,8 @@ var TabsProgressListener = {
onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
#ifdef MOZ_CRASHREPORTER
if (!aRequest.URI)
aRequest.QueryInterface(Ci.nsIChannel);
if (aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
if (aRequest instanceof Ci.nsIChannel &&
aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT) {
gCrashReporter.annotateCrashReport("URL", aRequest.URI.spec);
}