| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 {% endif %}{# not method.overloads #} | 442 {% endif %}{# not method.overloads #} |
| 443 {% if world_suffix in method.activity_logging_world_list %} | 443 {% if world_suffix in method.activity_logging_world_list %} |
| 444 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 444 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 445 V8PerContextData* contextData = scriptState->perContextData(); | 445 V8PerContextData* contextData = scriptState->perContextData(); |
| 446 {% if method.activity_logging_world_check %} | 446 {% if method.activity_logging_world_check %} |
| 447 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 447 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
| 448 {% else %} | 448 {% else %} |
| 449 if (contextData && contextData->activityLogger()) { | 449 if (contextData && contextData->activityLogger()) { |
| 450 {% endif %} | 450 {% endif %} |
| 451 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{metho
d.name}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 451 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{metho
d.name}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
| 452 Vector<v8::Local<v8::Value> > loggerArgs = toImplArguments<v8::Local<v8:
:Value> >(info, 0, exceptionState); | 452 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<v8::Local<v8::
Value>>(info, 0, exceptionState); |
| 453 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); | 453 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); |
| 454 } | 454 } |
| 455 {% endif %} | 455 {% endif %} |
| 456 {% if method.is_custom %} | 456 {% if method.is_custom %} |
| 457 {{v8_class}}::{{method.name}}MethodCustom(info); | 457 {{v8_class}}::{{method.name}}MethodCustom(info); |
| 458 {% else %} | 458 {% else %} |
| 459 {{cpp_class_or_partial}}V8Internal::{{method.name}}Method{{world_suffix}}(in
fo); | 459 {{cpp_class_or_partial}}V8Internal::{{method.name}}Method{{world_suffix}}(in
fo); |
| 460 {% endif %} | 460 {% endif %} |
| 461 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 461 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 462 } | 462 } |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 if method.overloads else | 651 if method.overloads else |
| 652 method.runtime_enabled_function) %} | 652 method.runtime_enabled_function) %} |
| 653 prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::Functio
nTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}Metho
dCallback, v8Undefined(), defaultSignature, {{method.number_of_required_argument
s}})->GetFunction()); | 653 prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::Functio
nTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}Metho
dCallback, v8Undefined(), defaultSignature, {{method.number_of_required_argument
s}})->GetFunction()); |
| 654 {% endfilter %}{# runtime_enabled() #} | 654 {% endfilter %}{# runtime_enabled() #} |
| 655 {% endfilter %}{# exposed() #} | 655 {% endfilter %}{# exposed() #} |
| 656 {% endfilter %}{# per_context_enabled() #} | 656 {% endfilter %}{# per_context_enabled() #} |
| 657 {% endfor %} | 657 {% endfor %} |
| 658 {% endif %} | 658 {% endif %} |
| 659 } | 659 } |
| 660 {%- endmacro %} | 660 {%- endmacro %} |
| OLD | NEW |