Bug 1232520 - dont' invoke AbstractThread::MainThread()->Dispatch() to avoid reentrant of AutoTaskDispatcher during tail dispatching phase. r=jya.

This commit is contained in:
JW Wang 2015-12-18 11:50:32 +08:00
parent 83bca6f9cf
commit 480823b5c6

View File

@ -480,7 +480,10 @@ DecodedStream::CreateData(MozPromiseHolder<GenericPromise>&& aPromise)
self->mOutputStreamManager.Disconnect();
delete data;
});
AbstractThread::MainThread()->Dispatch(r.forget());
// We are in tail dispatching phase. Don't call
// AbstractThread::MainThread()->Dispatch() to avoid reentrant
// AutoTaskDispatcher.
NS_DispatchToMainThread(r.forget());
}
}
RefPtr<DecodedStream> mThis;