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

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

Issue 209893002: Custom wrap constructor overloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code tweak Created 6 years, 9 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/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 3153e6945d7e70785842248b1ad3d87dfb6ba6c5..a69466483e00f8c5fe7dc243d6564dda824c4307 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -386,13 +386,17 @@ static void constructor{{constructor.overload_index}}(const v8::FunctionCallback
Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
{% endif %}
{{ref_ptr}}<{{cpp_class}}> impl = {{cpp_class}}::create({{constructor.argument_list | join(', ')}});
- v8::Handle<v8::Object> wrapper = info.Holder();
{% if is_constructor_raises_exception %}
if (exceptionState.throwIfNeeded())
return;
{% endif %}
+ {% if has_custom_wrap %}
+ v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate());
+ {% else %}
+ v8::Handle<v8::Object> wrapper = info.Holder();
V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configuration}});
+ {% endif %}
v8SetReturnValue(info, wrapper);
}
{% endmacro %}
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698