| OLD | NEW |
| 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} | 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} |
| 2 | 2 |
| 3 {##############################################################################} | 3 {##############################################################################} |
| 4 {% macro attribute_getter(attribute, world_suffix) %} | 4 {% macro attribute_getter(attribute, world_suffix) %} |
| 5 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 5 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
| 6 {%- if attribute.is_data_type_property %} | 6 {%- if attribute.is_data_type_property %} |
| 7 const v8::PropertyCallbackInfo<v8::Value>& info | 7 const v8::PropertyCallbackInfo<v8::Value>& info |
| 8 {%- else %} | 8 {%- else %} |
| 9 const v8::FunctionCallbackInfo<v8::Value>& info | 9 const v8::FunctionCallbackInfo<v8::Value>& info |
| 10 {%- endif %}) { | 10 {%- endif %}) { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 {{cpp_value}} = "{{value}}"; | 181 {{cpp_value}} = "{{value}}"; |
| 182 {% endfor %} | 182 {% endfor %} |
| 183 } else { | 183 } else { |
| 184 {{cpp_value}} = "{{reflect_invalid}}"; | 184 {{cpp_value}} = "{{reflect_invalid}}"; |
| 185 } | 185 } |
| 186 {% endmacro %} | 186 {% endmacro %} |
| 187 | 187 |
| 188 | 188 |
| 189 {##############################################################################} | 189 {##############################################################################} |
| 190 {% macro attribute_getter_callback(attribute, world_suffix) %} | 190 {% macro attribute_getter_callback(attribute, world_suffix) %} |
| 191 void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( | 191 {{exported}}void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( |
| 192 {%- if attribute.is_data_type_property %} | 192 {%- if attribute.is_data_type_property %} |
| 193 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info | 193 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info |
| 194 {%- else %} | 194 {%- else %} |
| 195 const v8::FunctionCallbackInfo<v8::Value>& info | 195 const v8::FunctionCallbackInfo<v8::Value>& info |
| 196 {%- endif %}) { | 196 {%- endif %}) { |
| 197 {% if attribute.deprecate_as %} | 197 {% if attribute.deprecate_as %} |
| 198 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{attribute.deprecate_as}}); | 198 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{attribute.deprecate_as}}); |
| 199 {% endif %} | 199 {% endif %} |
| 200 | 200 |
| 201 {% if attribute.measure_as %} | 201 {% if attribute.measure_as %} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 222 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); | 222 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); |
| 223 {% else %} | 223 {% else %} |
| 224 {{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeGetter{{world_s
uffix}}(info); | 224 {{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeGetter{{world_s
uffix}}(info); |
| 225 {% endif %} | 225 {% endif %} |
| 226 } | 226 } |
| 227 {% endmacro %} | 227 {% endmacro %} |
| 228 | 228 |
| 229 | 229 |
| 230 {##############################################################################} | 230 {##############################################################################} |
| 231 {% macro attribute_cache_property_callback(attribute) %} | 231 {% macro attribute_cache_property_callback(attribute) %} |
| 232 v8::Local<v8::Private> {{attribute.name}}CachedAccessorCallback(v8::Isolate* iso
late) | 232 {{exported}}v8::Local<v8::Private> {{attribute.name}}CachedAccessorCallback(v8::
Isolate* isolate) |
| 233 { | 233 { |
| 234 return V8PrivateProperty::get{{attribute.cached_accessor_name}}(isolate).get
Private(); | 234 return V8PrivateProperty::get{{attribute.cached_accessor_name}}(isolate).get
Private(); |
| 235 } | 235 } |
| 236 {% endmacro %} | 236 {% endmacro %} |
| 237 | 237 |
| 238 | 238 |
| 239 {##############################################################################} | 239 {##############################################################################} |
| 240 {% macro constructor_getter_callback(attribute, world_suffix) %} | 240 {% macro constructor_getter_callback(attribute, world_suffix) %} |
| 241 void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Local<v8::N
ame> property, const v8::PropertyCallbackInfo<v8::Value>& info) { | 241 {{exported}}void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8:
:Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 242 {% if attribute.deprecate_as %} | 242 {% if attribute.deprecate_as %} |
| 243 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{attribute.deprecate_as}}); | 243 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{attribute.deprecate_as}}); |
| 244 {% endif %} | 244 {% endif %} |
| 245 | 245 |
| 246 {% if attribute.measure_as %} | 246 {% if attribute.measure_as %} |
| 247 UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{at
tribute.measure_as('ConstructorGetter')}}); | 247 UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{at
tribute.measure_as('ConstructorGetter')}}); |
| 248 {% endif %} | 248 {% endif %} |
| 249 | 249 |
| 250 v8ConstructorAttributeGetter(property, info); | 250 v8ConstructorAttributeGetter(property, info); |
| 251 } | 251 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 // Invalidate the cached value. | 359 // Invalidate the cached value. |
| 360 V8HiddenValue::deleteHiddenValue(ScriptState::forFunctionObject(info), holder,
v8AtomicString(info.GetIsolate(), "{{attribute.name}}")); | 360 V8HiddenValue::deleteHiddenValue(ScriptState::forFunctionObject(info), holder,
v8AtomicString(info.GetIsolate(), "{{attribute.name}}")); |
| 361 {% endif %} | 361 {% endif %} |
| 362 } | 362 } |
| 363 {% endfilter %}{# format_remove_duplicates #} | 363 {% endfilter %}{# format_remove_duplicates #} |
| 364 {% endmacro %} | 364 {% endmacro %} |
| 365 | 365 |
| 366 | 366 |
| 367 {##############################################################################} | 367 {##############################################################################} |
| 368 {% macro attribute_setter_callback(attribute, world_suffix) %} | 368 {% macro attribute_setter_callback(attribute, world_suffix) %} |
| 369 void {{attribute.name}}AttributeSetterCallback{{world_suffix}}( | 369 {{exported}}void {{attribute.name}}AttributeSetterCallback{{world_suffix}}( |
| 370 {%- if attribute.is_data_type_property %} | 370 {%- if attribute.is_data_type_property %} |
| 371 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info | 371 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info |
| 372 {%- else %} | 372 {%- else %} |
| 373 const v8::FunctionCallbackInfo<v8::Value>& info | 373 const v8::FunctionCallbackInfo<v8::Value>& info |
| 374 {%- endif %}) { | 374 {%- endif %}) { |
| 375 {% if not attribute.is_data_type_property %} | 375 {% if not attribute.is_data_type_property %} |
| 376 v8::Local<v8::Value> v8Value = info[0]; | 376 v8::Local<v8::Value> v8Value = info[0]; |
| 377 {% endif %} | 377 {% endif %} |
| 378 | 378 |
| 379 {% if attribute.deprecate_as %} | 379 {% if attribute.deprecate_as %} |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 setter_callback_for_main_world, | 467 setter_callback_for_main_world, |
| 468 cached_accessor_callback, | 468 cached_accessor_callback, |
| 469 wrapper_type_info, | 469 wrapper_type_info, |
| 470 access_control, | 470 access_control, |
| 471 property_attribute, | 471 property_attribute, |
| 472 property_location(attribute), | 472 property_location(attribute), |
| 473 holder_check, | 473 holder_check, |
| 474 ] %} | 474 ] %} |
| 475 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 475 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
| 476 {%- endmacro %} | 476 {%- endmacro %} |
| OLD | NEW |