| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 {######################################} | 230 {######################################} |
| 231 {% macro cpp_method_call(method, v8_set_return_value, cpp_value) %} | 231 {% macro cpp_method_call(method, v8_set_return_value, cpp_value) %} |
| 232 {# Local variables #} | 232 {# Local variables #} |
| 233 {% if method.is_call_with_script_state %} | 233 {% if method.is_call_with_script_state %} |
| 234 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 234 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 235 {% endif %} | 235 {% endif %} |
| 236 {% if method.is_call_with_execution_context %} | 236 {% if method.is_call_with_execution_context %} |
| 237 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()); | 237 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()); |
| 238 {% endif %} | 238 {% endif %} |
| 239 {% if method.is_call_with_script_arguments %} | 239 {% if method.is_call_with_script_arguments %} |
| 240 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, {{method.num
ber_of_arguments}})); | 240 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(scriptState, info,
{{method.number_of_arguments}})); |
| 241 {% endif %} | 241 {% endif %} |
| 242 {# Call #} | 242 {# Call #} |
| 243 {% if method.idl_type == 'void' %} | 243 {% if method.idl_type == 'void' %} |
| 244 {{cpp_value}}; | 244 {{cpp_value}}; |
| 245 {% elif method.is_constructor %} | 245 {% elif method.is_constructor %} |
| 246 {{method.cpp_type}} impl = {{cpp_value}}; | 246 {{method.cpp_type}} impl = {{cpp_value}}; |
| 247 {% elif method.is_call_with_script_state or method.is_raises_exception %} | 247 {% elif method.is_call_with_script_state or method.is_raises_exception %} |
| 248 {# FIXME: consider always using a local variable #} | 248 {# FIXME: consider always using a local variable #} |
| 249 {{method.cpp_type}} result = {{cpp_value}}; | 249 {{method.cpp_type}} result = {{cpp_value}}; |
| 250 {% endif %} | 250 {% endif %} |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 {% endif %} | 555 {% endif %} |
| 556 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); | 556 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); |
| 557 {% if is_constructor_raises_exception %} | 557 {% if is_constructor_raises_exception %} |
| 558 if (exceptionState.throwIfNeeded()) | 558 if (exceptionState.throwIfNeeded()) |
| 559 return; | 559 return; |
| 560 {% endif %} | 560 {% endif %} |
| 561 | 561 |
| 562 {{generate_constructor_wrapper(constructor) | indent}} | 562 {{generate_constructor_wrapper(constructor) | indent}} |
| 563 } | 563 } |
| 564 {% endmacro %} | 564 {% endmacro %} |
| OLD | NEW |