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