| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 {##############################################################################} | 211 {##############################################################################} |
| 212 {% macro attribute_getter_callback(attribute, world_suffix) %} | 212 {% macro attribute_getter_callback(attribute, world_suffix) %} |
| 213 void {{v8_class_or_partial}}::{{attribute.name}}AttributeGetterCallback{{world_s
uffix}}( | 213 void {{v8_class_or_partial}}::{{attribute.name}}AttributeGetterCallback{{world_s
uffix}}( |
| 214 {%- if attribute.is_data_type_property %} | 214 {%- if attribute.is_data_type_property %} |
| 215 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info | 215 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info |
| 216 {%- else %} | 216 {%- else %} |
| 217 const v8::FunctionCallbackInfo<v8::Value>& info | 217 const v8::FunctionCallbackInfo<v8::Value>& info |
| 218 {%- endif %}) { | 218 {%- endif %}) { |
| 219 {% if attribute.deprecate_as %} | 219 {% if attribute.deprecate_as %} |
| 220 Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseC
ounter::k{{attribute.deprecate_as}}); | 220 Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), WebF
eature::k{{attribute.deprecate_as}}); |
| 221 {% endif %} | 221 {% endif %} |
| 222 | 222 |
| 223 {% if attribute.measure_as %} | 223 {% if attribute.measure_as %} |
| 224 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{a
ttribute.measure_as('AttributeGetter')}}); | 224 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{a
ttribute.measure_as('AttributeGetter')}}); |
| 225 {% endif %} | 225 {% endif %} |
| 226 | 226 |
| 227 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} | 227 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
| 228 {% if attribute.is_static %} | 228 {% if attribute.is_static %} |
| 229 ScriptState* scriptState = ScriptState::ForFunctionObject(info); | 229 ScriptState* scriptState = ScriptState::ForFunctionObject(info); |
| 230 {% else %} | 230 {% else %} |
| 231 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 231 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 232 {% endif %} | 232 {% endif %} |
| 233 V8PerContextData* contextData = scriptState->PerContextData(); | 233 V8PerContextData* contextData = scriptState->PerContextData(); |
| 234 if ( | 234 if ( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 255 { | 255 { |
| 256 return V8PrivateProperty::Get{{attribute.cached_accessor_name}}(isolate).GetPr
ivate(); | 256 return V8PrivateProperty::Get{{attribute.cached_accessor_name}}(isolate).GetPr
ivate(); |
| 257 } | 257 } |
| 258 {% endmacro %} | 258 {% endmacro %} |
| 259 | 259 |
| 260 | 260 |
| 261 {##############################################################################} | 261 {##############################################################################} |
| 262 {% macro constructor_getter_callback(attribute, world_suffix) %} | 262 {% macro constructor_getter_callback(attribute, world_suffix) %} |
| 263 void {{v8_class_or_partial}}::{{attribute.name}}ConstructorGetterCallback{{world
_suffix}}(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value
>& info) { | 263 void {{v8_class_or_partial}}::{{attribute.name}}ConstructorGetterCallback{{world
_suffix}}(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value
>& info) { |
| 264 {% if attribute.deprecate_as %} | 264 {% if attribute.deprecate_as %} |
| 265 Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseC
ounter::k{{attribute.deprecate_as}}); | 265 Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), WebF
eature::k{{attribute.deprecate_as}}); |
| 266 {% endif %} | 266 {% endif %} |
| 267 | 267 |
| 268 {% if attribute.measure_as %} | 268 {% if attribute.measure_as %} |
| 269 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{a
ttribute.measure_as('ConstructorGetter')}}); | 269 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{a
ttribute.measure_as('ConstructorGetter')}}); |
| 270 {% endif %} | 270 {% endif %} |
| 271 | 271 |
| 272 V8ConstructorAttributeGetter(property, info); | 272 V8ConstructorAttributeGetter(property, info); |
| 273 } | 273 } |
| 274 {% endmacro %} | 274 {% endmacro %} |
| 275 | 275 |
| 276 | 276 |
| 277 {##############################################################################} | 277 {##############################################################################} |
| 278 {% macro attribute_setter(attribute, world_suffix) %} | 278 {% macro attribute_setter(attribute, world_suffix) %} |
| 279 static void {{attribute.name}}AttributeSetter{{world_suffix}}( | 279 static void {{attribute.name}}AttributeSetter{{world_suffix}}( |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 {%- if attribute.is_data_type_property %} | 431 {%- if attribute.is_data_type_property %} |
| 432 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info | 432 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info |
| 433 {%- else %} | 433 {%- else %} |
| 434 const v8::FunctionCallbackInfo<v8::Value>& info | 434 const v8::FunctionCallbackInfo<v8::Value>& info |
| 435 {%- endif %}) { | 435 {%- endif %}) { |
| 436 {% if not attribute.is_data_type_property %} | 436 {% if not attribute.is_data_type_property %} |
| 437 v8::Local<v8::Value> v8Value = info[0]; | 437 v8::Local<v8::Value> v8Value = info[0]; |
| 438 {% endif %} | 438 {% endif %} |
| 439 | 439 |
| 440 {% if attribute.deprecate_as %} | 440 {% if attribute.deprecate_as %} |
| 441 Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), UseC
ounter::k{{attribute.deprecate_as}}); | 441 Deprecation::CountDeprecation(CurrentExecutionContext(info.GetIsolate()), WebF
eature::k{{attribute.deprecate_as}}); |
| 442 {% endif %} | 442 {% endif %} |
| 443 | 443 |
| 444 {% if attribute.measure_as %} | 444 {% if attribute.measure_as %} |
| 445 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{a
ttribute.measure_as('AttributeSetter')}}); | 445 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{a
ttribute.measure_as('AttributeSetter')}}); |
| 446 {% endif %} | 446 {% endif %} |
| 447 | 447 |
| 448 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 448 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
| 449 {% if attribute.is_static %} | 449 {% if attribute.is_static %} |
| 450 ScriptState* scriptState = ScriptState::ForFunctionObject(info); | 450 ScriptState* scriptState = ScriptState::ForFunctionObject(info); |
| 451 {% else %} | 451 {% else %} |
| 452 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 452 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 453 {% endif %} | 453 {% endif %} |
| 454 V8PerContextData* contextData = scriptState->PerContextData(); | 454 V8PerContextData* contextData = scriptState->PerContextData(); |
| 455 if ( | 455 if ( |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration[] =
{ | 579 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration[] =
{ |
| 580 {{accessor_configuration(attribute)}} | 580 {{accessor_configuration(attribute)}} |
| 581 }; | 581 }; |
| 582 for (const auto& accessorConfig : accessorConfiguration) | 582 for (const auto& accessorConfig : accessorConfiguration) |
| 583 V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, accessorConfig); | 583 V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, accessorConfig); |
| 584 {% endfilter %}{# runtime_enabled #} | 584 {% endfilter %}{# runtime_enabled #} |
| 585 {% endfilter %}{# secure_context #} | 585 {% endfilter %}{# secure_context #} |
| 586 {% endfilter %}{# exposed #} | 586 {% endfilter %}{# exposed #} |
| 587 {% endfor %} | 587 {% endfor %} |
| 588 {% endmacro %} | 588 {% endmacro %} |
| OLD | NEW |