Chromium Code Reviews| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 160 {% if attribute.deprecate_as %} | 160 {% if attribute.deprecate_as %} |
| 161 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); | 161 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); |
| 162 {% endif %} | 162 {% endif %} |
| 163 {% if attribute.measure_as %} | 163 {% if attribute.measure_as %} |
| 164 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); | 164 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); |
| 165 {% endif %} | 165 {% endif %} |
| 166 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} | 166 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
| 167 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); | 167 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); |
| 168 if (contextData && contextData->activityLogger()) | 168 if (contextData && contextData->activityLogger()) |
| 169 contextData->activityLogger()->log("{{interface_name}}.{{attribute.name} }", 0, 0, "Getter"); | 169 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute .name}}"); |
| 170 {% endif %} | 170 {% endif %} |
| 171 {% if attribute.has_custom_getter %} | 171 {% if attribute.has_custom_getter %} |
| 172 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); | 172 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); |
| 173 {% else %} | 173 {% else %} |
| 174 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i nfo); | 174 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i nfo); |
| 175 {% endif %} | 175 {% endif %} |
| 176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 177 } | 177 } |
| 178 {% endfilter %} | 178 {% endfilter %} |
| 179 {% endmacro %} | 179 {% endmacro %} |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 294 {% if attribute.deprecate_as %} | 294 {% if attribute.deprecate_as %} |
| 295 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); | 295 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); |
| 296 {% endif %} | 296 {% endif %} |
| 297 {% if attribute.measure_as %} | 297 {% if attribute.measure_as %} |
| 298 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); | 298 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); |
| 299 {% endif %} | 299 {% endif %} |
| 300 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 300 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
| 301 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); | 301 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); |
| 302 if (contextData && contextData->activityLogger()) { | 302 if (contextData && contextData->activityLogger()) { |
| 303 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 303 v8::Handle<v8::Value> HACK; |
|
Devlin
2014/03/26 22:58:42
I'm a bit at a loss for how to best get the curren
Nils Barth (inactive)
2014/03/27 02:20:08
?
Can't you just pass in jsValue (sans array),
as
Nils Barth (inactive)
2014/03/27 02:39:50
OIC, sorry, the point of this CL is to add this va
Nils Barth (inactive)
2014/03/27 02:51:25
Simplest would be if you could just call the *Attr
Devlin
2014/03/27 20:35:30
(I've never worked on the bindings before, so I mi
pmarch
2014/04/17 16:10:58
I am not an expert on this, but it looks to me tha
| |
| 304 contextData->activityLogger()->log("{{interface_name}}.{{attribute.name} }", 1, &loggerArg[0], "Setter"); | 304 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute .name}}", jsValue, HACK); |
| 305 } | 305 } |
| 306 {% endif %} | 306 {% endif %} |
| 307 {% if attribute.is_custom_element_callbacks or attribute.is_reflect %} | 307 {% if attribute.is_custom_element_callbacks or attribute.is_reflect %} |
| 308 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 308 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 309 {% endif %} | 309 {% endif %} |
| 310 {% if attribute.has_custom_setter %} | 310 {% if attribute.has_custom_setter %} |
| 311 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); | 311 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); |
| 312 {% else %} | 312 {% else %} |
| 313 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j sValue, info); | 313 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j sValue, info); |
| 314 {% endif %} | 314 {% endif %} |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 316 } | 316 } |
| 317 {% endfilter %} | 317 {% endfilter %} |
| 318 {% endmacro %} | 318 {% endmacro %} |
| OLD | NEW |