Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp

Issue 2094143002: Avoid snapshotting ContextLifecycleObservers when iterating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove IterationScope, indirection not needed Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp b/third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp
index 3c24d90cd42b5118e3876ac71eb9e178556cae85..544a471784f6f960eb69e94c1ed86941bf05d732 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindowLifecycleNotifier.cpp
@@ -31,21 +31,21 @@ namespace blink {
void DOMWindowLifecycleNotifier::notifyAddEventListener(LocalDOMWindow* window, const AtomicString& eventType)
{
- TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll);
+ TemporaryChange<IterationState> scope(m_iterationState, AllowingNone);
for (DOMWindowLifecycleObserver* observer : m_observers)
observer->didAddEventListener(window, eventType);
}
void DOMWindowLifecycleNotifier::notifyRemoveEventListener(LocalDOMWindow* window, const AtomicString& eventType)
{
- TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll);
+ TemporaryChange<IterationState> scope(m_iterationState, AllowingNone);
for (DOMWindowLifecycleObserver* observer : m_observers)
observer->didRemoveEventListener(window, eventType);
}
void DOMWindowLifecycleNotifier::notifyRemoveAllEventListeners(LocalDOMWindow* window)
{
- TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll);
+ TemporaryChange<IterationState> scope(m_iterationState, AllowingNone);
for (DOMWindowLifecycleObserver* observer : m_observers)
observer->didRemoveAllEventListeners(window);
}

Powered by Google App Engine
This is Rietveld 408576698