e10s http: Document channels' cache descriptor causes hang on reloads r=honza

--HG--
extra : rebase_source : 997176054b8665819c4fd9d670e7705087592daa
This commit is contained in:
Jason Duell 2010-08-17 15:17:00 -07:00
parent ff104af24b
commit 1a28c6a685
4 changed files with 17 additions and 0 deletions

View File

@ -428,6 +428,7 @@ HttpChannelChild::OnStopRequest(const nsresult& statusCode)
// We need to keep the document loading channel alive for further
// communication, mainly for collecting a security state values.
mKeptAlive = true;
SendDocumentChannelCleanup();
}
}

View File

@ -259,6 +259,16 @@ HttpChannelParent::RecvRedirect2Result(const nsresult& result,
return true;
}
bool
HttpChannelParent::RecvDocumentChannelCleanup()
{
// We must clear the cache entry here, else we'll block other channels from
// reading it if we've got it open for writing.
mCacheDescriptor = 0;
return true;
}
//-----------------------------------------------------------------------------
// nsIRequestObserver and nsIStreamListener methods equivalents
//-----------------------------------------------------------------------------

View File

@ -109,6 +109,7 @@ protected:
const PRInt32& low,
const PRInt32& broken,
const PRInt32& no);
virtual bool RecvDocumentChannelCleanup();
virtual void ActorDestroy(ActorDestroyReason why);

View File

@ -94,6 +94,11 @@ parent:
// Reports approval/veto of redirect by child process redirect observers
Redirect2Result(nsresult result, RequestHeaderTuples changedHeaders);
// For document loads we keep this protocol open after child's
// OnStopRequest, and send this msg (instead of __delete__) to allow
// partial cleanup on parent.
DocumentChannelCleanup();
child:
OnStartRequest(nsHttpResponseHead responseHead,
PRBool useResponseHead,