Chromium Code Reviews| Index: Source/bindings/templates/methods.cpp |
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
| index 3153e6945d7e70785842248b1ad3d87dfb6ba6c5..9389ef75132bc96a2b64c02087d8b620bbe4f516 100644 |
| --- a/Source/bindings/templates/methods.cpp |
| +++ b/Source/bindings/templates/methods.cpp |
| @@ -386,14 +386,18 @@ 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 %} |
| + v8SetReturnValue(info, 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}}); |
| v8SetReturnValue(info, wrapper); |
|
Nils Barth (inactive)
2014/03/24 08:50:26
I don't follow how this differs from what I commit
Nils Barth (inactive)
2014/03/24 08:55:00
OIC, I did it for *named* constructors.
Could you
|
| + {% endif %} |
| } |
| {% endmacro %} |