Bug 1264852 - destroy an event tree as it gets processed, r=n.nethercote

This commit is contained in:
Alexander Surkov 2016-04-28 13:12:46 -04:00
parent b24fdb8375
commit 7679e64fd6
2 changed files with 4 additions and 6 deletions

View File

@ -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(),

View File

@ -402,7 +402,6 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
mObservingState = eRefreshProcessing;
mEventTree.Process();
mEventTree.Clear();
ProcessEventQueue();