diff --git a/accessible/base/EventTree.cpp b/accessible/base/EventTree.cpp index 9c635a6c73c3..82d6eed1c8c5 100644 --- a/accessible/base/EventTree.cpp +++ b/accessible/base/EventTree.cpp @@ -183,13 +183,12 @@ TreeMutation::Done() void EventTree::Process() { - EventTree* node = mFirst; - while (node) { + while (mFirst) { // Skip a node and its subtree if its container is not in the document. - if (node->mContainer->IsInDocument()) { - node->Process(); + if (mFirst->mContainer->IsInDocument()) { + mFirst->Process(); } - node = node->mNext; + mFirst = mFirst->mNext.forget(); } MOZ_ASSERT(mContainer || mDependentEvents.IsEmpty(), diff --git a/accessible/base/NotificationController.cpp b/accessible/base/NotificationController.cpp index 2823171a90d8..a0ad0bfa0248 100644 --- a/accessible/base/NotificationController.cpp +++ b/accessible/base/NotificationController.cpp @@ -402,7 +402,6 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime) mObservingState = eRefreshProcessing; mEventTree.Process(); - mEventTree.Clear(); ProcessEventQueue();