Don't leak the channel and XMLHttpRequest object if AsyncOpen fails. Bug

323454, r=biesi, sr=darin


git-svn-id: svn://10.0.0.236/trunk@190622 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2006-02-21 00:00:44 +00:00
parent 942b6bdd8a
commit 42cccb1214
2 changed files with 6 additions and 0 deletions

View File

@ -441,6 +441,9 @@ nsSyncLoader::PushAsyncStream(nsIStreamListener* aListener)
}
}
// Note that if AsyncOpen failed that's ok -- the only caller of
// this method nulls out mChannel immediately after we return.
service->PopThreadEventQueue(currentThreadQ);
return rv;

View File

@ -1641,6 +1641,9 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
if (modalEventQueue) {
mEventQService->PopThreadEventQueue(modalEventQueue);
}
// Drop our ref to the channel to avoid cycles
mChannel = nsnull;
return rv;
}