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

Unified Diff: third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h

Issue 2091023004: Do not use untraced members while notifying ActiveDOMObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/dom/ContextLifecycleNotifier.h
diff --git a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h
index a8d11aafb3ec4ce1dae2ccd4bd33a15d53445cef..3f00b353fdb91bb7358b3ca4e1376ffffb029a24 100644
--- a/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h
+++ b/third_party/WebKit/Source/core/dom/ContextLifecycleNotifier.h
@@ -58,6 +58,14 @@ protected:
#if DCHECK_IS_ON()
bool contains(ActiveDOMObject*) const;
#endif
+
+private:
+ // Iterates over a snapshot of the observers, invoking the
+ // callback with each observer that is an ActiveDOMObject.
+ // Observers must not be added during |eachActiveDOMObject|. It is
+ // safe to remove observers, though. The callback is not invoked
+ // for observers which get removed first.
+ void eachActiveDOMObject(void (*)(ActiveDOMObject*));
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698