зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264852 - destroy an event tree as it gets processed, r=n.nethercote
This commit is contained in:
Родитель
b24fdb8375
Коммит
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();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче