Chromium Code Reviews| Index: Source/bindings/templates/methods.cpp |
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
| index 08b10d2e325431c4d0fb0883983e80ba70a9d475..3153e6945d7e70785842248b1ad3d87dfb6ba6c5 100644 |
| --- a/Source/bindings/templates/methods.cpp |
| +++ b/Source/bindings/templates/methods.cpp |
| @@ -434,13 +434,17 @@ static void {{v8_class}}ConstructorCallback(const v8::FunctionCallbackInfo<v8::V |
| {{generate_argument(constructor, argument) | indent}} |
| {% endfor %} |
| RefPtr<{{cpp_class}}> impl = {{cpp_class}}::createForJSConstructor({{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 %} |
|
sof
2014/03/24 08:16:10
This isn't complete; the constructor overloads nee
Nils Barth (inactive)
2014/03/24 08:49:11
I don't follow;
I rearranged the original CL sligh
|
| + 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}}Constructor::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configuration}}); |
|
Nils Barth (inactive)
2014/03/24 03:13:19
BTW, the custom wrap() means we don't need to call
haraken
2014/03/24 03:32:44
Right. The custom wrap() should be already calling
Nils Barth (inactive)
2014/03/24 03:33:45
Got it; self-explanatory, so no comment needed.
|
| + {% endif %} |
| v8SetReturnValue(info, wrapper); |
| } |
| {% endmacro %} |