зеркало из https://github.com/mozilla/pjs.git
fixes bug 135547 "make event queues more robust"
r=danm sr=rpotts,brendan
This commit is contained in:
Родитель
38659b8678
Коммит
787c628d67
|
@ -386,6 +386,12 @@ nsEventQueueImpl::ProcessPendingEvents()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
PL_ProcessPendingEvents(mEventQueue);
|
PL_ProcessPendingEvents(mEventQueue);
|
||||||
|
|
||||||
|
// if we're no longer accepting events and there are still events in the
|
||||||
|
// queue, then process remaining events.
|
||||||
|
if (!mAcceptingEvents && PL_EventAvailable(mEventQueue))
|
||||||
|
PL_ProcessPendingEvents(mEventQueue);
|
||||||
|
|
||||||
CheckForDeactivation();
|
CheckForDeactivation();
|
||||||
|
|
||||||
if (mElderQueue) {
|
if (mElderQueue) {
|
||||||
|
|
|
@ -331,6 +331,7 @@ nsEventQueueServiceImpl::PopThreadEventQueue(nsIEventQueue *aQueue)
|
||||||
++gEventQueueLogCount;
|
++gEventQueueLogCount;
|
||||||
#endif
|
#endif
|
||||||
aQueue->StopAcceptingEvents();
|
aQueue->StopAcceptingEvents();
|
||||||
|
aQueue->ProcessPendingEvents(); // make sure we don't orphan any events
|
||||||
|
|
||||||
if (aQueue == queue.get()) { // are we reomving the eldest queue?
|
if (aQueue == queue.get()) { // are we reomving the eldest queue?
|
||||||
mEventQTable.Remove(&key); // remove nsIEventQueue from hash table (releases)
|
mEventQTable.Remove(&key); // remove nsIEventQueue from hash table (releases)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче