mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 595972 - Fix event queue state invariants on HTTP channel resume. r=jduell a=blocking-fennec
This commit is contained in:
parent
b89691f173
commit
ad7e8474d6
@ -790,8 +790,15 @@ HttpChannelChild::Resume()
|
||||
NS_ENSURE_TRUE(mSuspendCount > 0, NS_ERROR_UNEXPECTED);
|
||||
SendResume();
|
||||
mSuspendCount--;
|
||||
if (!mSuspendCount)
|
||||
if (!mSuspendCount) {
|
||||
// If we were suspended outside of an event handler (bug 595972) we'll
|
||||
// consider ourselves unqueued. This is a legal state of affairs but
|
||||
// FlushEventQueue() can't easily ensure this fact, so we'll do some
|
||||
// fudging to set the invariants correctly.
|
||||
if (mQueuePhase == PHASE_UNQUEUED)
|
||||
mQueuePhase = PHASE_FINISHED_QUEUEING;
|
||||
FlushEventQueue();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user