зеркало из https://github.com/mozilla/pjs.git
Bug 743178, CORS may keep XHR alive too long, r=bz, a=tracking-firefox14+
This commit is contained in:
Родитель
0ba3045c86
Коммит
63d3675987
|
@ -639,7 +639,13 @@ nsCORSListenerProxy::OnStopRequest(nsIRequest* aRequest,
|
|||
nsISupports* aContext,
|
||||
nsresult aStatusCode)
|
||||
{
|
||||
return mOuterListener->OnStopRequest(aRequest, aContext, aStatusCode);
|
||||
nsresult rv = mOuterListener->OnStopRequest(aRequest, aContext, aStatusCode);
|
||||
mOuterListener = nsnull;
|
||||
mOuterNotificationCallbacks = nsnull;
|
||||
mRedirectCallback = nsnull;
|
||||
mOldRedirectChannel = nsnull;
|
||||
mNewRedirectChannel = nsnull;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -1026,6 +1032,9 @@ nsCORSPreflightListener::OnStopRequest(nsIRequest *aRequest,
|
|||
nsISupports *aContext,
|
||||
nsresult aStatus)
|
||||
{
|
||||
mOuterChannel = nsnull;
|
||||
mOuterListener = nsnull;
|
||||
mOuterContext = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -2502,6 +2502,7 @@ nsXMLHttpRequest::ChangeStateToDone()
|
|||
// methods/members will not throw.
|
||||
// This matches what IE does.
|
||||
mChannel = nsnull;
|
||||
mCORSPreflightChannel = nsnull;
|
||||
}
|
||||
else if (!(mState & XML_HTTP_REQUEST_GOT_FINAL_STOP)) {
|
||||
// We're a multipart request, so we're not done. Reset to opened.
|
||||
|
|
Загрузка…
Ссылка в новой задаче