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

Unified Diff: third_party/WebKit/Source/bindings/templates/interface.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/templates/interface.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp b/third_party/WebKit/Source/bindings/templates/interface.cpp
index 3e522fa757dc7e986e91c68d60805c402d86bdd9..c60125870a0c95e5b835b82a674562de6741ea5e 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp
@@ -534,8 +534,25 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{% endif %}
{% endblock %}
+{##############################################################################}
+
+{% block trace_wrapper_references %}
+{% if trace_wrapper_references %}
+DEFINE_TRACE_WRAPPERS({{cpp_class_or_partial}})
+{
+ {% for traceable in trace_wrapper_references %}
+ visitor->trace({{traceable}}());
+ {% endfor %}
+
+ {% if parent_interface %}
+ {{parent_interface}}::traceWrappers(visitor);
+ {% endif %}
+}
+{% endif %}
+{% endblock %}
{##############################################################################}
+
{% block visit_dom_wrapper %}
{% if set_wrapper_reference_from or set_wrapper_reference_to %}
void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* scriptWrappable, const v8::Persistent<v8::Object>& wrapper)

Powered by Google App Engine
This is Rietveld 408576698