mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 1026951 - Assertion failure: NS_IsMainThread() (OnStateStop should only be called on the main thread.). r=sworkman
This commit is contained in:
parent
43aad61439
commit
bb9e12a5bf
@ -469,6 +469,16 @@ nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream *stream)
|
||||
// EnsureWaiting isn't blocked by it.
|
||||
mProcessingCallbacks = false;
|
||||
|
||||
// We must break the loop when we're switching event delivery to another
|
||||
// thread and the input stream pump is suspended, otherwise
|
||||
// OnStateStop() might be called off the main thread. See bug 1026951
|
||||
// comment #107 for the exact scenario.
|
||||
if (mSuspendCount && mRetargeting) {
|
||||
mState = nextState;
|
||||
mWaitingForInputStreamReady = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// Wait asynchronously if there is still data to transfer, or we're
|
||||
// switching event delivery to another thread.
|
||||
if (!mSuspendCount && (stillTransferring || mRetargeting)) {
|
||||
|
Loading…
Reference in New Issue
Block a user