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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp

Issue 1876383003: Introduce infrastructure for tracing ScriptWrappables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate Haraken's wonderful comments Created 4 years, 8 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/ActiveScriptWrappable.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp
index 437bf83932da2186d80e05737591d455cae89909..a538410c4a7ba98758ae41eba34fc7a2e10a4d46 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ActiveScriptWrappable.cpp
@@ -4,6 +4,7 @@
#include "bindings/core/v8/ActiveScriptWrappable.h"
+#include "bindings/core/v8/ScriptWrappable.h"
#include "wtf/HashSet.h"
#include "wtf/ThreadSpecific.h"
#include "wtf/Threading.h"
@@ -38,4 +39,14 @@ ScriptWrappable* ActiveScriptWrappable::toScriptWrappable() const
return m_scriptWrappable;
}
+void ActiveScriptWrappable::traceActiveWrappable(ScriptWrappableVisitor* visitor)
haraken 2016/04/13 12:26:22 traceActiveWrappable => traceWrappers ? (I want t
Marcel Hlopko 2016/04/14 16:39:08 Done.
+{
+ for (auto activeWrappable : activeScriptWrappables()) {
+ if (!activeWrappable->hasPendingActivity())
+ continue;
+
+ visitor->trace(activeWrappable->toScriptWrappable());
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698