| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 394 {% if not method.overloads %}{# Overloaded methods are measured in overload_
resolution_method() #} | 394 {% if not method.overloads %}{# Overloaded methods are measured in overload_
resolution_method() #} |
| 395 {% if method.measure_as %} | 395 {% if method.measure_as %} |
| 396 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{
method.measure_as}}); | 396 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{
method.measure_as}}); |
| 397 {% endif %} | 397 {% endif %} |
| 398 {% if method.deprecate_as %} | 398 {% if method.deprecate_as %} |
| 399 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{method.deprecate_as}}); | 399 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{method.deprecate_as}}); |
| 400 {% endif %} | 400 {% endif %} |
| 401 {% endif %}{# not method.overloads #} | 401 {% endif %}{# not method.overloads #} |
| 402 {% if world_suffix in method.activity_logging_world_list %} | 402 {% if world_suffix in method.activity_logging_world_list %} |
| 403 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 403 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 404 V8PerContextData* contextData = scriptState->perContextData(); |
| 405 {% if method.activity_logging_world_check %} |
| 406 if (contextData && contextData->activityLogger() && scriptState->world().isI
solatedWorld()) |
| 407 {% else %} |
| 404 if (contextData && contextData->activityLogger()) { | 408 if (contextData && contextData->activityLogger()) { |
| 409 {% endif %} |
| 405 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) | 410 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) |
| 406 and delete toVectorOfArguments #} | 411 and delete toVectorOfArguments #} |
| 407 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 412 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 408 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); | 413 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); |
| 409 } | 414 } |
| 410 {% endif %} | 415 {% endif %} |
| 411 {% if method.is_custom %} | 416 {% if method.is_custom %} |
| 412 {{v8_class}}::{{method.name}}MethodCustom(info); | 417 {{v8_class}}::{{method.name}}MethodCustom(info); |
| 413 {% else %} | 418 {% else %} |
| 414 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); | 419 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 {% endif %} | 558 {% endif %} |
| 554 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); | 559 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons
tructor.argument_list | join(', ')}}); |
| 555 {% if is_constructor_raises_exception %} | 560 {% if is_constructor_raises_exception %} |
| 556 if (exceptionState.throwIfNeeded()) | 561 if (exceptionState.throwIfNeeded()) |
| 557 return; | 562 return; |
| 558 {% endif %} | 563 {% endif %} |
| 559 | 564 |
| 560 {{generate_constructor_wrapper(constructor) | indent}} | 565 {{generate_constructor_wrapper(constructor) | indent}} |
| 561 } | 566 } |
| 562 {% endmacro %} | 567 {% endmacro %} |
| OLD | NEW |