зеркало из https://github.com/mozilla/pjs.git
Fixes bug 90196 "M092 crash [@ nsHttpConnection::OnHeadersAvailable]"
r=bbaetz, sr=dougt, a=dbaron
This commit is contained in:
Родитель
da6ce72e74
Коммит
fafc726cb0
|
@ -565,11 +565,20 @@ nsHttpConnection::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
|
|||
{
|
||||
LOG(("nsHttpConnection::OnStartRequest [this=%x]\n", this));
|
||||
|
||||
if (mTransaction && ctxt) { // do this only once
|
||||
nsCOMPtr<nsISupports> info;
|
||||
mSocketTransport->GetSecurityInfo(getter_AddRefs(info));
|
||||
mTransaction->SetSecurityInfo(info);
|
||||
// because this code can run before AsyncWrite (AsyncRead) returns, we need
|
||||
// to capture the write (read) request object. see bug 90196 for an example
|
||||
// of why this is necessary.
|
||||
if (ctxt) {
|
||||
mWriteRequest = request;
|
||||
// this only needs to be done once, so do it for the write request.
|
||||
if (mTransaction) {
|
||||
nsCOMPtr<nsISupports> info;
|
||||
mSocketTransport->GetSecurityInfo(getter_AddRefs(info));
|
||||
mTransaction->SetSecurityInfo(info);
|
||||
}
|
||||
}
|
||||
else
|
||||
mReadRequest = request;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче