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

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

Issue 965393002: Simplify ContextLifecycleNotifier's handling of ActiveDOMObjects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: simplify ContextLifecycleNotifier Created 5 years, 10 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
« no previous file with comments | « no previous file | Source/core/dom/ContextLifecycleNotifier.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContextLifecycleNotifier.h
diff --git a/Source/core/dom/ContextLifecycleNotifier.h b/Source/core/dom/ContextLifecycleNotifier.h
index 3a4c914d973973124d58621585e1faf8e4ea69fb..a2a127db89043b5b1d3acce2d43e7fbe237c7469 100644
--- a/Source/core/dom/ContextLifecycleNotifier.h
+++ b/Source/core/dom/ContextLifecycleNotifier.h
@@ -46,17 +46,18 @@ public:
void notifySuspendingActiveDOMObjects();
void notifyStoppingActiveDOMObjects();
- using ActiveDOMObjectSet = HashSet<ActiveDOMObject*>;
-
- const ActiveDOMObjectSet& activeDOMObjects() const { return m_activeDOMObjects; }
- bool contains(ActiveDOMObject* object) const { return m_activeDOMObjects.contains(object); }
+ unsigned activeDOMObjectCount() const { return m_activeDOMObjectCount; }
haraken 2015/03/03 04:46:21 This is used only in window.internals to count the
sof 2015/03/03 07:26:18 Agreed, iterating over the set to count them up is
bool hasPendingActivity() const;
protected:
explicit ContextLifecycleNotifier(ExecutionContext*);
+#if ENABLE(ASSERT)
+ bool contains(ActiveDOMObject*) const;
+#endif
+
private:
- ActiveDOMObjectSet m_activeDOMObjects;
+ unsigned m_activeDOMObjectCount;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/dom/ContextLifecycleNotifier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698