OLD | NEW |
1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value, check_api_experiment %} | 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value, check_origin_trial %} |
2 | 2 |
3 {##############################################################################} | 3 {##############################################################################} |
4 {% macro generate_method(method, world_suffix) %} | 4 {% macro generate_method(method, world_suffix) %} |
5 {% if method.returns_promise and method.has_exception_state %} | 5 {% if method.returns_promise and method.has_exception_state %} |
6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis
e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat
e) | 6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis
e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat
e) |
7 {% else %} | 7 {% else %} |
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
9 {% endif %} | 9 {% endif %} |
10 { | 10 { |
11 {# Local variables #} | 11 {# Local variables #} |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 {% macro method_callback(method, world_suffix) %} | 499 {% macro method_callback(method, world_suffix) %} |
500 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
backInfo<v8::Value>& info) | 500 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
backInfo<v8::Value>& info) |
501 { | 501 { |
502 {% if not method.overloads %}{# Overloaded methods are measured in overload_
resolution_method() #} | 502 {% if not method.overloads %}{# Overloaded methods are measured in overload_
resolution_method() #} |
503 {% if method.measure_as %} | 503 {% if method.measure_as %} |
504 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); | 504 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); |
505 {% endif %} | 505 {% endif %} |
506 {% if method.deprecate_as %} | 506 {% if method.deprecate_as %} |
507 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe
cutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); | 507 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe
cutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); |
508 {% endif %} | 508 {% endif %} |
509 {% if method.is_api_experiment_enabled %} | 509 {% if method.is_origin_trial_enabled %} |
510 {{check_api_experiment(method) | indent}} | 510 {{check_origin_trial(method) | indent}} |
511 {% endif %} | 511 {% endif %} |
512 {% endif %}{# not method.overloads #} | 512 {% endif %}{# not method.overloads #} |
513 {% if world_suffix in method.activity_logging_world_list %} | 513 {% if world_suffix in method.activity_logging_world_list %} |
514 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 514 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
515 V8PerContextData* contextData = scriptState->perContextData(); | 515 V8PerContextData* contextData = scriptState->perContextData(); |
516 {% if method.activity_logging_world_check %} | 516 {% if method.activity_logging_world_check %} |
517 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 517 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
518 {% else %} | 518 {% else %} |
519 if (contextData && contextData->activityLogger()) { | 519 if (contextData && contextData->activityLogger()) { |
520 {% endif %} | 520 {% endif %} |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all | 701 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all |
702 if method.overloads else | 702 if method.overloads else |
703 method.runtime_enabled_function) %} | 703 method.runtime_enabled_function) %} |
704 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; | 704 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; |
705 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj
ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); | 705 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj
ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); |
706 {% endfilter %}{# runtime_enabled() #} | 706 {% endfilter %}{# runtime_enabled() #} |
707 {% endfilter %}{# exposed() #} | 707 {% endfilter %}{# exposed() #} |
708 {% endfor %} | 708 {% endfor %} |
709 {% endif %} | 709 {% endif %} |
710 {%- endmacro %} | 710 {%- endmacro %} |
OLD | NEW |