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 id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersjst, blocker
bugs634986
milestone2.0b13pre
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;
 }