Bug 634986. Don't act like we're redirecting if we don't have a channel. r=jst, a=blocker
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 28 Feb 2011 14:26:05 -0500
changeset 63181 262b38ced70e37d0c816e6e1e1c2dcc2152286ae
parent 63180 ad545273888ca11aaa45362c61f02d58cdef0af2
child 63182 55c573e5eb6c9dc2023b09501ca4feda9aac056c
push id19061
push userjst@mozilla.com
push dateMon, 28 Feb 2011 22:25:29 +0000
treeherdermozilla-central@262b38ced70e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst, blocker
bugs634986
milestone2.0b13pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 634986. Don't act like we're redirecting if we don't have a channel. r=jst, a=blocker
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -1025,18 +1025,19 @@ nsObjectLoadingContent::GetInterface(con
 
 // nsIChannelEventSink
 NS_IMETHODIMP
 nsObjectLoadingContent::AsyncOnChannelRedirect(nsIChannel *aOldChannel,
                                                nsIChannel *aNewChannel,
                                                PRUint32 aFlags,
                                                nsIAsyncVerifyRedirectCallback *cb)
 {
-  // If we're already busy with a new load, cancel the redirect
-  if (aOldChannel != mChannel) {
+  // If we're already busy with a new load, or have no load at all,
+  // cancel the redirect.
+  if (!mChannel || aOldChannel != mChannel) {
     return NS_BINDING_ABORTED;
   }
 
   mChannel = aNewChannel;
   cb->OnRedirectVerifyCallback(NS_OK);
   return NS_OK;
 }