| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% block indexed_property_getter %} | 5 {% block indexed_property_getter %} |
| 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
| 7 {% set getter = indexed_property_getter %} | 7 {% set getter = indexed_property_getter %} |
| 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 9 { | 9 { |
| 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 {% endif %} | 48 {% endif %} |
| 49 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 49 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 50 } | 50 } |
| 51 | 51 |
| 52 {% endif %} | 52 {% endif %} |
| 53 {% endblock %} | 53 {% endblock %} |
| 54 | 54 |
| 55 | 55 |
| 56 {##############################################################################} | 56 {##############################################################################} |
| 57 {% block indexed_property_setter %} | 57 {% block indexed_property_setter %} |
| 58 {% from 'conversions.cpp' import v8_value_to_local_cpp_value %} | 58 {% from 'utilities.cpp' import v8_value_to_local_cpp_value %} |
| 59 {% if indexed_property_setter and not indexed_property_setter.is_custom %} | 59 {% if indexed_property_setter and not indexed_property_setter.is_custom %} |
| 60 {% set setter = indexed_property_setter %} | 60 {% set setter = indexed_property_setter %} |
| 61 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) | 61 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 62 { | 62 { |
| 63 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 63 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
| 64 {{v8_value_to_local_cpp_value(setter) | indent}} | 64 {{v8_value_to_local_cpp_value(setter) | indent}} |
| 65 {% if setter.has_exception_state %} | 65 {% if setter.has_exception_state %} |
| 66 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "{{inter
face_name}}", info.Holder(), info.GetIsolate()); | 66 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "{{inter
face_name}}", info.Holder(), info.GetIsolate()); |
| 67 {% endif %} | 67 {% endif %} |
| 68 {% if setter.has_type_checking_interface %} | 68 {% if setter.has_type_checking_interface %} |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 {% endif %} | 216 {% endif %} |
| 217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 218 } | 218 } |
| 219 | 219 |
| 220 {% endif %} | 220 {% endif %} |
| 221 {% endblock %} | 221 {% endblock %} |
| 222 | 222 |
| 223 | 223 |
| 224 {##############################################################################} | 224 {##############################################################################} |
| 225 {% block named_property_setter %} | 225 {% block named_property_setter %} |
| 226 {% from 'conversions.cpp' import v8_value_to_local_cpp_value %} | 226 {% from 'utilities.cpp' import v8_value_to_local_cpp_value %} |
| 227 {% if named_property_setter and not named_property_setter.is_custom %} | 227 {% if named_property_setter and not named_property_setter.is_custom %} |
| 228 {% set setter = named_property_setter %} | 228 {% set setter = named_property_setter %} |
| 229 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 229 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 230 { | 230 { |
| 231 auto nameString = name.As<v8::String>(); | 231 auto nameString = name.As<v8::String>(); |
| 232 {% if setter.has_exception_state %} | 232 {% if setter.has_exception_state %} |
| 233 v8::String::Utf8Value namedProperty(nameString); | 233 v8::String::Utf8Value namedProperty(nameString); |
| 234 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty,
"{{interface_name}}", info.Holder(), info.GetIsolate()); | 234 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty,
"{{interface_name}}", info.Holder(), info.GetIsolate()); |
| 235 {% endif %} | 235 {% endif %} |
| 236 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 236 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 {{cpp_class}}V8Internal::constructor(info); | 607 {{cpp_class}}V8Internal::constructor(info); |
| 608 {% endif %} | 608 {% endif %} |
| 609 } | 609 } |
| 610 | 610 |
| 611 {% endif %} | 611 {% endif %} |
| 612 {% endblock %} | 612 {% endblock %} |
| 613 | 613 |
| 614 | 614 |
| 615 {##############################################################################} | 615 {##############################################################################} |
| 616 {% macro install_do_not_check_security_method(method, world_suffix, instance_tem
plate, prototype_template) %} | 616 {% macro install_do_not_check_security_method(method, world_suffix, instance_tem
plate, prototype_template) %} |
| 617 {% from 'conversions.cpp' import property_location %} | 617 {% from 'utilities.cpp' import property_location %} |
| 618 {# Methods that are [DoNotCheckSecurity] are always readable, but if they are | 618 {# Methods that are [DoNotCheckSecurity] are always readable, but if they are |
| 619 changed and then accessed from a different origin, we do not return the | 619 changed and then accessed from a different origin, we do not return the |
| 620 underlying value, but instead return a new copy of the original function. | 620 underlying value, but instead return a new copy of the original function. |
| 621 This is achieved by storing the changed value as a hidden property. #} | 621 This is achieved by storing the changed value as a hidden property. #} |
| 622 {% set getter_callback = | 622 {% set getter_callback = |
| 623 '%sV8Internal::%sOriginSafeMethodGetterCallback%s' % | 623 '%sV8Internal::%sOriginSafeMethodGetterCallback%s' % |
| 624 (cpp_class, method.name, world_suffix) %} | 624 (cpp_class, method.name, world_suffix) %} |
| 625 {% set setter_callback = | 625 {% set setter_callback = |
| 626 '{0}V8Internal::{0}OriginSafeMethodSetterCallback'.format(cpp_class) | 626 '{0}V8Internal::{0}OriginSafeMethodSetterCallback'.format(cpp_class) |
| 627 if not method.is_unforgeable else '0' %} | 627 if not method.is_unforgeable else '0' %} |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 | 978 |
| 979 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 979 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
| 980 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 980 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 981 { | 981 { |
| 982 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 982 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
| 983 } | 983 } |
| 984 | 984 |
| 985 {% endfor %} | 985 {% endfor %} |
| 986 {% endif %} | 986 {% endif %} |
| 987 {% endblock %} | 987 {% endblock %} |
| OLD | NEW |