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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h

Issue 1966743004: Move tracking of ActiveScriptWrappables to V8PerIsolateData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazy creation of map Created 4 years, 7 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/bindings/core/v8/V8PerIsolateData.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
index 58230d9ee7ee327ed20a06931f51c993aa203646..ab1723219f39fce966a8f8cd22e6b666d32f99c3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.h
@@ -33,6 +33,7 @@
#include "core/CoreExport.h"
#include "gin/public/isolate_holder.h"
#include "gin/public/v8_idle_task_runner.h"
+#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
#include "wtf/OwnPtr.h"
@@ -41,6 +42,7 @@
namespace blink {
+class ActiveScriptWrappable;
class DOMDataStore;
class ThreadDebugger;
class StringCache;
@@ -138,6 +140,10 @@ public:
void setThreadDebugger(PassOwnPtr<ThreadDebugger>);
ThreadDebugger* threadDebugger();
+ using ActiveScriptWrappableSet = HeapHashSet<WeakMember<ActiveScriptWrappable>>;
+ void addActiveScriptWrappable(ActiveScriptWrappable*);
+ const ActiveScriptWrappableSet& activeScriptWrappables() const { return *m_activeScriptWrappables; }
+
private:
V8PerIsolateData();
~V8PerIsolateData();
@@ -177,6 +183,8 @@ private:
Vector<OwnPtr<EndOfScopeTask>> m_endOfScopeTasks;
OwnPtr<ThreadDebugger> m_threadDebugger;
+
+ Persistent<ActiveScriptWrappableSet> m_activeScriptWrappables;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698