Avoid asking the event queue service for an event queue during XPCOM shutdown. r+sr=roc b=327655

This commit is contained in:
dbaron%dbaron.org 2006-02-22 00:51:35 +00:00
Родитель a584e245a7
Коммит c4fd5d52a0
1 изменённых файлов: 9 добавлений и 8 удалений

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

@ -231,20 +231,20 @@ nsViewManager::~nsViewManager()
// Make sure to RevokeEvents for all viewmanagers, since some events
// are posted by a non-root viewmanager.
nsCOMPtr<nsIEventQueue> eventQueue;
mEventQueueService->GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
getter_AddRefs(eventQueue));
NS_ASSERTION(eventQueue, "Event queue is null");
eventQueue->RevokeEvents(this);
if (mInvalidateEventQueue) {
mInvalidateEventQueue->RevokeEvents(this);
mInvalidateEventQueue = nsnull;
}
if (mSynthMouseMoveEventQueue) {
mSynthMouseMoveEventQueue->RevokeEvents(this);
mSynthMouseMoveEventQueue = nsnull;
}
if (!IsRootVM()) {
// We have a strong ref to mRootViewManager
NS_RELEASE(mRootViewManager);
}
mInvalidateEventQueue = nsnull;
mSynthMouseMoveEventQueue = nsnull;
mRootScrollable = nsnull;
NS_ASSERTION((mVMCount > 0), "underflow of viewmanagers");
@ -1218,6 +1218,7 @@ nsViewManager::UpdateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedReg
childWidget;
childWidget = childWidget->GetNextSibling()) {
nsView* view = nsView::GetViewFor(childWidget);
NS_ASSERTION(view != aWidgetView, "will recur infinitely");
if (view && view->GetVisibility() == nsViewVisibility_kShow) {
// Don't mess with views that are in completely different view
// manager trees