| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro generate_method(method, world_suffix) %} | 2 {% macro generate_method(method, world_suffix) %} |
| 3 {% filter conditional(method.conditional_string) %} | 3 {% filter conditional(method.conditional_string) %} |
| 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 5 { | 5 { |
| 6 {# Local variables #} | 6 {# Local variables #} |
| 7 {% if method.has_exception_state %} | 7 {% if method.has_exception_state %} |
| 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
| 9 {% endif %} | 9 {% endif %} |
| 10 {# Overloaded methods have length checked during overload resolution #} | 10 {# Overloaded methods have length checked during overload resolution #} |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 {% for argument in method.arguments %} | 63 {% for argument in method.arguments %} |
| 64 {{generate_argument_var_declaration(argument)}}; | 64 {{generate_argument_var_declaration(argument)}}; |
| 65 {% endfor %} | 65 {% endfor %} |
| 66 { | 66 { |
| 67 {% if method.arguments_need_try_catch %} | 67 {% if method.arguments_need_try_catch %} |
| 68 v8::TryCatch block; | 68 v8::TryCatch block; |
| 69 V8RethrowTryCatchScope rethrow(block); | 69 V8RethrowTryCatchScope rethrow(block); |
| 70 {% endif %} | 70 {% endif %} |
| 71 {% for argument in method.arguments %} | 71 {% for argument in method.arguments %} |
| 72 {% if argument.default_value %} | 72 {% if argument.default_value %} |
| 73 if (!info[{{argument.index}}]->IsUndefined()) { | 73 if (info.Length() > {{argument.index}}) { |
| 74 {{generate_argument(method, argument, world_suffix) | indent(8)}} | 74 {{generate_argument(method, argument, world_suffix) | indent(8)}} |
| 75 } else { | 75 } else { |
| 76 {{argument.name}} = {{argument.default_value}}; | 76 {{argument.name}} = {{argument.default_value}}; |
| 77 } | 77 } |
| 78 {% else %} | 78 {% else %} |
| 79 {{generate_argument(method, argument, world_suffix) | indent}} | 79 {{generate_argument(method, argument, world_suffix) | indent}} |
| 80 {% endif %} | 80 {% endif %} |
| 81 {% endfor %} | 81 {% endfor %} |
| 82 } | 82 } |
| 83 {% endmacro %} | 83 {% endmacro %} |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), isolate); | 585 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), isolate); |
| 586 {% else %} | 586 {% else %} |
| 587 {% set constructor_class = v8_class + ('Constructor' | 587 {% set constructor_class = v8_class + ('Constructor' |
| 588 if constructor.is_named_constructor else | 588 if constructor.is_named_constructor else |
| 589 '') %} | 589 '') %} |
| 590 v8::Handle<v8::Object> wrapper = info.Holder(); | 590 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 591 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, isolate, {{wrapper_configuration}}); | 591 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, isolate, {{wrapper_configuration}}); |
| 592 {% endif %} | 592 {% endif %} |
| 593 v8SetReturnValue(info, wrapper); | 593 v8SetReturnValue(info, wrapper); |
| 594 {% endmacro %} | 594 {% endmacro %} |
| OLD | NEW |