fixes bug 135547 "make event queues more robust"

r=danm sr=rpotts,brendan
This commit is contained in:
darin%netscape.com 2002-04-11 00:16:04 +00:00
Родитель 804a3c8cac
Коммит d645b6c31c
2 изменённых файлов: 7 добавлений и 0 удалений

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

@ -386,6 +386,12 @@ nsEventQueueImpl::ProcessPendingEvents()
}
#endif
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();
if (mElderQueue) {

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

@ -331,6 +331,7 @@ nsEventQueueServiceImpl::PopThreadEventQueue(nsIEventQueue *aQueue)
++gEventQueueLogCount;
#endif
aQueue->StopAcceptingEvents();
aQueue->ProcessPendingEvents(); // make sure we don't orphan any events
if (aQueue == queue.get()) { // are we reomving the eldest queue?
mEventQTable.Remove(&key); // remove nsIEventQueue from hash table (releases)