mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Don't leak the channel and XMLHttpRequest object if AsyncOpen fails. Bug
323454, r=biesi, sr=darin
This commit is contained in:
parent
d6aef8e3c8
commit
80ea4604ed
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user