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

Unified Diff: Source/bindings/templates/methods.cpp

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 4966ee5ba8358fae8c748344c7ba247918bb3f69..773e13f5af66a47d50b3111d18760bec86bdca05 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -616,8 +616,12 @@ v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
if constructor.is_named_constructor else
'') %}
v8::Handle<v8::Object> wrapper = info.Holder();
+{% if is_script_wrappable %}
+impl.get()->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate());
+{% else %}
V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constructor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate());
{% endif %}
+{% endif %}
v8SetReturnValue(info, wrapper);
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698