OLD | NEW |
1 {% from 'conversions.cpp' import v8_value_to_local_cpp_value %} | 1 {% from 'conversions.cpp' import v8_value_to_local_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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 {{throw_type_error(method, '"parameter %s (\'%s\') is not an object."' % | 211 {{throw_type_error(method, '"parameter %s (\'%s\') is not an object."' % |
212 (argument.index + 1, argument.name)) | indent}} | 212 (argument.index + 1, argument.name)) | indent}} |
213 } | 213 } |
214 {% endif %} | 214 {% endif %} |
215 {% endmacro %} | 215 {% endmacro %} |
216 | 216 |
217 | 217 |
218 {######################################} | 218 {######################################} |
219 {% macro cpp_method_call(method, v8_set_return_value, cpp_value) %} | 219 {% macro cpp_method_call(method, v8_set_return_value, cpp_value) %} |
220 {# Local variables #} | 220 {# Local variables #} |
221 {% if method.is_call_with_script_state %} | 221 {% if method.is_call_with_script_state or method.is_call_with_this_value %} |
222 {# [ConstructorCallWith=ScriptState] #} | 222 {# [ConstructorCallWith=ScriptState] #} |
223 {# [CallWith=ScriptState] #} | 223 {# [CallWith=ScriptState] #} |
224 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 224 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
225 {% endif %} | 225 {% endif %} |
226 {% if method.is_call_with_execution_context %} | 226 {% if method.is_call_with_execution_context %} |
227 {# [ConstructorCallWith=ExecutionContext] #} | 227 {# [ConstructorCallWith=ExecutionContext] #} |
228 {# [CallWith=ExecutionContext] #} | 228 {# [CallWith=ExecutionContext] #} |
229 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); | 229 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
230 {% endif %} | 230 {% endif %} |
231 {% if method.is_call_with_script_arguments %} | 231 {% if method.is_call_with_script_arguments %} |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 if method.overloads else | 653 if method.overloads else |
654 method.runtime_enabled_function) %} | 654 method.runtime_enabled_function) %} |
655 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()); | 655 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()); |
656 {% endfilter %}{# runtime_enabled() #} | 656 {% endfilter %}{# runtime_enabled() #} |
657 {% endfilter %}{# exposed() #} | 657 {% endfilter %}{# exposed() #} |
658 {% endfilter %}{# per_context_enabled() #} | 658 {% endfilter %}{# per_context_enabled() #} |
659 {% endfor %} | 659 {% endfor %} |
660 {% endif %} | 660 {% endif %} |
661 } | 661 } |
662 {%- endmacro %} | 662 {%- endmacro %} |
OLD | NEW |