Bug 1169867 - XMLHttpRequest::SendInternal should not unpin itself when the worker goes away. r=bent

This commit is contained in:
Andrea Marchesini 2015-06-12 10:06:19 -04:00
Родитель 84fd2a875a
Коммит 42a5970722
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1882,6 +1882,11 @@ XMLHttpRequest::SendInternal(const nsAString& aStringBody,
new SendRunnable(mWorkerPrivate, mProxy, aStringBody, Move(aBody),
aClonedObjects, syncLoopTarget, hasUploadListeners);
if (!runnable->Dispatch(cx)) {
// Dispatch() may have spun the event loop and we may have already unrooted.
// If so we don't want autoUnpin to try again.
if (!mRooted) {
autoUnpin.Clear();
}
aRv.Throw(NS_ERROR_FAILURE);
return;
}