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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 {% if attribute.has_custom_getter %} | 175 {% if attribute.has_custom_getter %} |
| 176 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); | 176 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); |
| 177 {% else %} | 177 {% else %} |
| 178 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i nfo); | 178 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i nfo); |
| 179 {% endif %} | 179 {% endif %} |
| 180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 181 } | 181 } |
| 182 {% endfilter %} | 182 {% endfilter %} |
| 183 {% endmacro %} | 183 {% endmacro %} |
| 184 | 184 |
| 185 {##############################################################################} | |
|
Nils Barth (inactive)
2014/03/05 07:27:52
Could you add an extra blank line before this?
(Se
sof
2014/03/05 12:45:48
Done.
| |
| 186 {% macro attribute_constructor_callback(attribute, world_suffix) %} | |
|
Nils Barth (inactive)
2014/03/05 07:27:52
This macro looks fine;
there's overlap with the ge
| |
| 187 {% filter conditional(attribute.conditional_string) %} | |
| 188 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 189 { | |
| 190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
| 191 {% if attribute.deprecate_as %} | |
| 192 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); | |
| 193 {% endif %} | |
| 194 {% if attribute.measure_as %} | |
| 195 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); | |
| 196 {% endif %} | |
| 197 {{cpp_class}}V8Internal::{{cpp_class}}ConstructorGetter{{world_suffix}}(prop erty, info); | |
| 198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | |
| 199 } | |
| 200 {% endfilter %} | |
| 201 {% endmacro %} | |
| 202 | |
| 185 | 203 |
| 186 {##############################################################################} | 204 {##############################################################################} |
| 187 {% macro attribute_setter(attribute, world_suffix) %} | 205 {% macro attribute_setter(attribute, world_suffix) %} |
| 188 {% filter conditional(attribute.conditional_string) %} | 206 {% filter conditional(attribute.conditional_string) %} |
| 189 static void {{attribute.name}}AttributeSetter{{world_suffix}}( | 207 static void {{attribute.name}}AttributeSetter{{world_suffix}}( |
| 190 {%- if attribute.is_expose_js_accessors %} | 208 {%- if attribute.is_expose_js_accessors %} |
| 191 v8::Local<v8::Value> jsValue, const v8::FunctionCallbackInfo<v8::Value>& info | 209 v8::Local<v8::Value> jsValue, const v8::FunctionCallbackInfo<v8::Value>& info |
| 192 {%- else %} | 210 {%- else %} |
| 193 v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info | 211 v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info |
| 194 {%- endif %}) | 212 {%- endif %}) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 {% endif %} | 314 {% endif %} |
| 297 {% if attribute.has_custom_setter %} | 315 {% if attribute.has_custom_setter %} |
| 298 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); | 316 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(jsValue, info); |
| 299 {% else %} | 317 {% else %} |
| 300 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j sValue, info); | 318 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(j sValue, info); |
| 301 {% endif %} | 319 {% endif %} |
| 302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 303 } | 321 } |
| 304 {% endfilter %} | 322 {% endfilter %} |
| 305 {% endmacro %} | 323 {% endmacro %} |
| OLD | NEW |