mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1264852 - destroy an event tree as it gets processed, r=n.nethercote
This commit is contained in:
parent
b24fdb8375
commit
7679e64fd6
@ -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(),
|
||||
|
@ -402,7 +402,6 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||
mObservingState = eRefreshProcessing;
|
||||
|
||||
mEventTree.Process();
|
||||
mEventTree.Clear();
|
||||
|
||||
ProcessEventQueue();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user