| OLD | NEW |
| 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} | 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} |
| 2 | 2 |
| 3 {##############################################################################} | 3 {##############################################################################} |
| 4 {% macro generate_method(method, world_suffix) %} | 4 {% macro generate_method(method, world_suffix) %} |
| 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 6 {% filter format_remove_duplicates([ | 6 {% filter format_remove_duplicates([ |
| 7 'ExceptionState exceptionState', | 7 'ExceptionState exceptionState', |
| 8 'ScriptState* scriptState = ']) %} | 8 'ScriptState* scriptState = ']) %} |
| 9 { | 9 { |
| 10 {% set define_exception_state -%} | 10 {% set define_exception_state -%} |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); | 490 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx
ecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); |
| 491 {% endif %} | 491 {% endif %} |
| 492 {% endif %}{# not method.overloads #} | 492 {% endif %}{# not method.overloads #} |
| 493 {% if world_suffix in method.activity_logging_world_list %} | 493 {% if world_suffix in method.activity_logging_world_list %} |
| 494 {% if method.is_static %} | 494 {% if method.is_static %} |
| 495 ScriptState* scriptState = ScriptState::forFunctionObject(info); | 495 ScriptState* scriptState = ScriptState::forFunctionObject(info); |
| 496 {% else %} | 496 {% else %} |
| 497 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 497 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 498 {% endif %} | 498 {% endif %} |
| 499 V8PerContextData* contextData = scriptState->perContextData(); | 499 V8PerContextData* contextData = scriptState->perContextData(); |
| 500 {% if method.activity_logging_world_check %} | |
| 501 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | |
| 502 {% else %} | |
| 503 if (contextData && contextData->activityLogger()) { | 500 if (contextData && contextData->activityLogger()) { |
| 504 {% endif %} | |
| 505 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Executi
onContext, "{{interface_name}}", "{{method.name}}"); | 501 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Executi
onContext, "{{interface_name}}", "{{method.name}}"); |
| 506 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc
al<v8::Value>>>(info, 0, exceptionState); | 502 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc
al<v8::Value>>>(info, 0, exceptionState); |
| 507 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); | 503 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); |
| 508 } | 504 } |
| 509 {% endif %} | 505 {% endif %} |
| 510 {% if method.is_ce_reactions %} | 506 {% if method.is_ce_reactions %} |
| 511 CEReactionsScope ceReactionsScope; | 507 CEReactionsScope ceReactionsScope; |
| 512 {% endif %} | 508 {% endif %} |
| 513 {% if method.is_custom %} | 509 {% if method.is_custom %} |
| 514 {{v8_class}}::{{method.name}}MethodCustom(info); | 510 {{v8_class}}::{{method.name}}MethodCustom(info); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 if method.overloads else | 674 if method.overloads else |
| 679 method.runtime_enabled_function) %} | 675 method.runtime_enabled_function) %} |
| 680 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; | 676 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; |
| 681 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto
typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); | 677 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto
typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); |
| 682 {% endfilter %}{# runtime_enabled() #} | 678 {% endfilter %}{# runtime_enabled() #} |
| 683 {% endfilter %}{# exposed() #} | 679 {% endfilter %}{# exposed() #} |
| 684 {% endfilter %}{# secure_context() #} | 680 {% endfilter %}{# secure_context() #} |
| 685 {% endfor %} | 681 {% endfor %} |
| 686 {% endif %} | 682 {% endif %} |
| 687 {%- endmacro %} | 683 {%- endmacro %} |
| OLD | NEW |