| 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 {# The findInstanceInPrototypeChain() call above only returns a non-empty ha
ndle if info.This() is an Object. #} | 505 {# The findInstanceInPrototypeChain() call above only returns a non-empty ha
ndle if info.This() is an Object. #} |
| 506 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "{{method.name}}")); | 506 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "{{method.name}}")); |
| 507 if (!hiddenValue.IsEmpty()) { | 507 if (!hiddenValue.IsEmpty()) { |
| 508 v8SetReturnValue(info, hiddenValue); | 508 v8SetReturnValue(info, hiddenValue); |
| 509 return; | 509 return; |
| 510 } | 510 } |
| 511 | 511 |
| 512 v8SetReturnValue(info, privateTemplate->GetFunction()); | 512 v8SetReturnValue(info, privateTemplate->GetFunction()); |
| 513 } | 513 } |
| 514 | 514 |
| 515 static void {{method.name}}OriginSafeMethodGetterCallback{{world_suffix}}(v8::Lo
cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 515 static void {{method.name}}OriginSafeMethodGetterCallback{{world_suffix}}(v8::Lo
cal<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 516 { | 516 { |
| 517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 518 {{cpp_class}}V8Internal::{{method.name}}OriginSafeMethodGetter{{world_suffix
}}(info); | 518 {{cpp_class}}V8Internal::{{method.name}}OriginSafeMethodGetter{{world_suffix
}}(info); |
| 519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 520 } | 520 } |
| 521 {% endmacro %} | 521 {% endmacro %} |
| 522 | 522 |
| 523 | 523 |
| 524 {##############################################################################} | 524 {##############################################################################} |
| 525 {% macro method_implemented_in_private_script(method) %} | 525 {% macro method_implemented_in_private_script(method) %} |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 if method.overloads else | 661 if method.overloads else |
| 662 method.runtime_enabled_function) %} | 662 method.runtime_enabled_function) %} |
| 663 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()); | 663 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()); |
| 664 {% endfilter %}{# runtime_enabled() #} | 664 {% endfilter %}{# runtime_enabled() #} |
| 665 {% endfilter %}{# exposed() #} | 665 {% endfilter %}{# exposed() #} |
| 666 {% endfilter %}{# per_context_enabled() #} | 666 {% endfilter %}{# per_context_enabled() #} |
| 667 {% endfor %} | 667 {% endfor %} |
| 668 {% endif %} | 668 {% endif %} |
| 669 } | 669 } |
| 670 {%- endmacro %} | 670 {%- endmacro %} |
| OLD | NEW |