OLD | NEW |
1 {##############################################################################} | 1 {##############################################################################} |
2 {% macro attribute_getter(attribute, world_suffix) %} | 2 {% macro attribute_getter(attribute, world_suffix) %} |
3 {% filter conditional(attribute.conditional_string) %} | 3 {% filter conditional(attribute.conditional_string) %} |
4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
5 {%- if attribute.is_expose_js_accessors %} | 5 {%- if attribute.is_expose_js_accessors %} |
6 const v8::FunctionCallbackInfo<v8::Value>& info | 6 const v8::FunctionCallbackInfo<v8::Value>& info |
7 {%- else %} | 7 {%- else %} |
8 const v8::PropertyCallbackInfo<v8::Value>& info | 8 const v8::PropertyCallbackInfo<v8::Value>& info |
9 {%- endif %}) | 9 {%- endif %}) |
10 { | 10 { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 const v8::FunctionCallbackInfo<v8::Value>& info | 147 const v8::FunctionCallbackInfo<v8::Value>& info |
148 {%- else %} | 148 {%- else %} |
149 v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info | 149 v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info |
150 {%- endif %}) | 150 {%- endif %}) |
151 { | 151 { |
152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
153 {% if attribute.deprecate_as %} | 153 {% if attribute.deprecate_as %} |
154 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 154 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
155 {% endif %} | 155 {% endif %} |
156 {% if attribute.measure_as %} | 156 {% if attribute.measure_as %} |
157 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); | 157 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); |
158 {% endif %} | 158 {% endif %} |
159 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} | 159 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
160 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 160 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
161 V8PerContextData* contextData = scriptState->perContextData(); | 161 V8PerContextData* contextData = scriptState->perContextData(); |
162 {% if attribute.activity_logging_world_check %} | 162 {% if attribute.activity_logging_world_check %} |
163 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 163 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
164 {% else %} | 164 {% else %} |
165 if (contextData && contextData->activityLogger()) | 165 if (contextData && contextData->activityLogger()) |
166 {% endif %} | 166 {% endif %} |
167 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute
.name}}"); | 167 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute
.name}}"); |
(...skipping 12 matching lines...) Expand all Loading... |
180 {##############################################################################} | 180 {##############################################################################} |
181 {% macro constructor_getter_callback(attribute, world_suffix) %} | 181 {% macro constructor_getter_callback(attribute, world_suffix) %} |
182 {% filter conditional(attribute.conditional_string) %} | 182 {% filter conditional(attribute.conditional_string) %} |
183 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | 183 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
184 { | 184 { |
185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
186 {% if attribute.deprecate_as %} | 186 {% if attribute.deprecate_as %} |
187 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 187 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
188 {% endif %} | 188 {% endif %} |
189 {% if attribute.measure_as %} | 189 {% if attribute.measure_as %} |
190 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); | 190 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}
); |
191 {% endif %} | 191 {% endif %} |
192 {{cpp_class_or_partial}}V8Internal::{{cpp_class}}ConstructorGetter{{world_su
ffix}}(property, info); | 192 {{cpp_class_or_partial}}V8Internal::{{cpp_class}}ConstructorGetter{{world_su
ffix}}(property, info); |
193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
194 } | 194 } |
195 {% endfilter %} | 195 {% endfilter %} |
196 {% endmacro %} | 196 {% endmacro %} |
197 | 197 |
198 | 198 |
199 {##############################################################################} | 199 {##############################################################################} |
200 {% macro attribute_setter(attribute, world_suffix) %} | 200 {% macro attribute_setter(attribute, world_suffix) %} |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 {%- endif %}) | 292 {%- endif %}) |
293 { | 293 { |
294 {% if attribute.is_expose_js_accessors %} | 294 {% if attribute.is_expose_js_accessors %} |
295 v8::Local<v8::Value> v8Value = info[0]; | 295 v8::Local<v8::Value> v8Value = info[0]; |
296 {% endif %} | 296 {% endif %} |
297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 297 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
298 {% if attribute.deprecate_as %} | 298 {% if attribute.deprecate_as %} |
299 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 299 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
300 {% endif %} | 300 {% endif %} |
301 {% if attribute.measure_as %} | 301 {% if attribute.measure_as %} |
302 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); | 302 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); |
303 {% endif %} | 303 {% endif %} |
304 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 304 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
305 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 305 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
306 V8PerContextData* contextData = scriptState->perContextData(); | 306 V8PerContextData* contextData = scriptState->perContextData(); |
307 {% if attribute.activity_logging_world_check %} | 307 {% if attribute.activity_logging_world_check %} |
308 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { | 308 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { |
309 {% else %} | 309 {% else %} |
310 if (contextData && contextData->activityLogger()) { | 310 if (contextData && contextData->activityLogger()) { |
311 {% endif %} | 311 {% endif %} |
312 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); | 312 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 access_control, | 423 access_control, |
424 property_attribute, | 424 property_attribute, |
425 only_exposed_to_private_script, | 425 only_exposed_to_private_script, |
426 ] %} | 426 ] %} |
427 {% if not attribute.is_expose_js_accessors %} | 427 {% if not attribute.is_expose_js_accessors %} |
428 {% set attribute_configuration_list = attribute_configuration_list | 428 {% set attribute_configuration_list = attribute_configuration_list |
429 + [on_prototype] %} | 429 + [on_prototype] %} |
430 {% endif %} | 430 {% endif %} |
431 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 431 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
432 {%- endmacro %} | 432 {%- endmacro %} |
OLD | NEW |