Bug 590121 - Null nsHttpResponseHead crashes in redirect. r=dwitte@gmail.com, a=blocking2.0final+

This commit is contained in:
Jason Duell 2010-09-08 17:53:55 -07:00
parent 4d7b0becf6
commit 97ed2f044d

View File

@ -220,11 +220,14 @@ HttpChannelParentListener::AsyncOnChannelRedirect(
newChannel->GetURI(getter_AddRefs(newURI));
nsHttpChannel *oldHttpChannel = static_cast<nsHttpChannel *>(oldChannel);
nsHttpResponseHead *responseHead = oldHttpChannel->GetResponseHead();
// TODO: check mActiveChannel->mIPCClosed and return val from Send function
mActiveChannel->SendRedirect1Begin(mRedirectChannel,
IPC::URI(newURI),
redirectFlags,
*oldHttpChannel->GetResponseHead());
responseHead ? *responseHead
: nsHttpResponseHead());
// mActiveChannel gets the response in RecvRedirect2Result and forwards it
// to this wrapper through OnContentRedirectResultReceived