зеркало из https://github.com/mozilla/pjs.git
Don't leak the channel and XMLHttpRequest object if AsyncOpen fails. Bug
323454, r=biesi, sr=darin
This commit is contained in:
Родитель
b4012a5bda
Коммит
358169850a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче