OLD | NEW |
1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value %} | 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value %} |
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 { |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 {% if method.activity_logging_world_check %} | 505 {% if method.activity_logging_world_check %} |
506 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 506 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
507 {% else %} | 507 {% else %} |
508 if (contextData && contextData->activityLogger()) { | 508 if (contextData && contextData->activityLogger()) { |
509 {% endif %} | 509 {% endif %} |
510 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{metho
d.name}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 510 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{metho
d.name}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
511 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc
al<v8::Value>>>(info, 0, exceptionState); | 511 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc
al<v8::Value>>>(info, 0, exceptionState); |
512 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); | 512 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na
me}}", info.Length(), loggerArgs.data()); |
513 } | 513 } |
514 {% endif %} | 514 {% endif %} |
| 515 {% if method.is_ce_reactions %} |
| 516 CEReactionsScope ceReactionsScope; |
| 517 {% endif %} |
515 {% if method.is_custom %} | 518 {% if method.is_custom %} |
516 {{v8_class}}::{{method.name}}MethodCustom(info); | 519 {{v8_class}}::{{method.name}}MethodCustom(info); |
517 {% elif method.is_post_message %} | 520 {% elif method.is_post_message %} |
518 postMessageImpl("{{interface_name}}", {{v8_class}}::toImpl(info.Holder()), i
nfo); | 521 postMessageImpl("{{interface_name}}", {{v8_class}}::toImpl(info.Holder()), i
nfo); |
519 {% else %} | 522 {% else %} |
520 {{cpp_class_or_partial}}V8Internal::{{method.name}}Method{{world_suffix}}(in
fo); | 523 {{cpp_class_or_partial}}V8Internal::{{method.name}}Method{{world_suffix}}(in
fo); |
521 {% endif %} | 524 {% endif %} |
522 } | 525 } |
523 {% endmacro %} | 526 {% endmacro %} |
524 | 527 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all | 683 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all |
681 if method.overloads else | 684 if method.overloads else |
682 method.runtime_enabled_function) %} | 685 method.runtime_enabled_function) %} |
683 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; | 686 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; |
684 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto
typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); | 687 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto
typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); |
685 {% endfilter %}{# runtime_enabled() #} | 688 {% endfilter %}{# runtime_enabled() #} |
686 {% endfilter %}{# exposed() #} | 689 {% endfilter %}{# exposed() #} |
687 {% endfor %} | 690 {% endfor %} |
688 {% endif %} | 691 {% endif %} |
689 {%- endmacro %} | 692 {%- endmacro %} |
OLD | NEW |