OLD | NEW |
1 {% from 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l
ocal_cpp_value %} | 1 {% from 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l
ocal_cpp_value %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% macro generate_method(method, world_suffix) %} | 5 {% macro generate_method(method, world_suffix) %} |
6 {% filter conditional(method.conditional_string) %} | 6 {% filter conditional(method.conditional_string) %} |
7 {% if method.returns_promise and method.has_exception_state %} | 7 {% if method.returns_promise and method.has_exception_state %} |
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis
e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat
e) | 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis
e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat
e) |
9 {% else %} | 9 {% else %} |
10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 {% endif %} | 88 {% endif %} |
89 {% endfor %} | 89 {% endfor %} |
90 } | 90 } |
91 {% endmacro %} | 91 {% endmacro %} |
92 | 92 |
93 | 93 |
94 {######################################} | 94 {######################################} |
95 {% macro generate_argument_var_declaration(argument) %} | 95 {% macro generate_argument_var_declaration(argument) %} |
96 {# FIXME: remove EventListener special case #} | 96 {# FIXME: remove EventListener special case #} |
97 {% if argument.idl_type == 'EventListener' %} | 97 {% if argument.idl_type == 'EventListener' %} |
98 RefPtr<{{argument.idl_type}}> {{argument.name}} | 98 RefPtrWillBeRawPtr<{{argument.idl_type}}> {{argument.name}} |
99 {%- else %} | 99 {%- else %} |
100 {{argument.cpp_type}} {{argument.name}} | 100 {{argument.cpp_type}} {{argument.name}} |
101 {%- endif %}{# argument.idl_type == 'EventListener' #} | 101 {%- endif %}{# argument.idl_type == 'EventListener' #} |
102 {% endmacro %} | 102 {% endmacro %} |
103 | 103 |
104 | 104 |
105 {######################################} | 105 {######################################} |
106 {% macro generate_argument(method, argument, world_suffix) %} | 106 {% macro generate_argument(method, argument, world_suffix) %} |
107 {% if argument.is_optional and not argument.has_default and | 107 {% if argument.is_optional and not argument.has_default and |
108 not argument.is_dictionary and | 108 not argument.is_dictionary and |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 if method.overloads else | 693 if method.overloads else |
694 method.runtime_enabled_function) %} | 694 method.runtime_enabled_function) %} |
695 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate::New(iso
late, {{cpp_class_or_partial}}V8Internal::{{method.name}}MethodCallback, v8Undef
ined(), defaultSignature, {{method.number_of_required_arguments}}); | 695 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate::New(iso
late, {{cpp_class_or_partial}}V8Internal::{{method.name}}MethodCallback, v8Undef
ined(), defaultSignature, {{method.number_of_required_arguments}}); |
696 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentContext())).
ToLocalChecked(); | 696 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentContext())).
ToLocalChecked(); |
697 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8AtomicString(
isolate, "{{method.name}}"), function)); | 697 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8AtomicString(
isolate, "{{method.name}}"), function)); |
698 {% endfilter %}{# runtime_enabled() #} | 698 {% endfilter %}{# runtime_enabled() #} |
699 {% endfilter %}{# exposed() #} | 699 {% endfilter %}{# exposed() #} |
700 {% endfor %} | 700 {% endfor %} |
701 {% endif %} | 701 {% endif %} |
702 {%- endmacro %} | 702 {%- endmacro %} |
OLD | NEW |