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:
parent
942b6bdd8a
commit
42cccb1214
@ -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…
x
Reference in New Issue
Block a user