| 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}}(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}(v8::Local<v8::Stri
ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 5 { | 5 { |
| 6 {% if attribute.is_unforgeable %} | 6 {% if attribute.is_unforgeable %} |
| 7 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain({{
v8_class_name}}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate()))); | 7 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain({{
v8_class_name}}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate()))); |
| 8 if (holder.IsEmpty()) | 8 if (holder.IsEmpty()) |
| 9 return; | 9 return; |
| 10 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(holder); | 10 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(holder); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 {##############################################################################} | 149 {##############################################################################} |
| 150 {% macro attribute_setter_callback(attribute, world_suffix) %} | 150 {% macro attribute_setter_callback(attribute, world_suffix) %} |
| 151 {% filter conditional(attribute.conditional_string) %} | 151 {% filter conditional(attribute.conditional_string) %} |
| 152 static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<
v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | 152 static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<
v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) |
| 153 { | 153 { |
| 154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 155 {% if attribute.deprecate_as %} | 155 {% if attribute.deprecate_as %} |
| 156 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::{{attribu
te.deprecate_as}}); | 156 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::{{attribu
te.deprecate_as}}); |
| 157 {% endif %} | 157 {% endif %} |
| 158 {% if attribute.measure_as %} |
| 159 UseCounter::count(activeDOMWindow(), UseCounter::{{attribute.measure_as}}); |
| 160 {% endif %} |
| 158 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 161 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
| 159 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 162 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 160 if (contextData && contextData->activityLogger()) { | 163 if (contextData && contextData->activityLogger()) { |
| 161 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 164 v8::Handle<v8::Value> loggerArg[] = { jsValue }; |
| 162 contextData->activityLogger()->log("{{interface_name}}.{{attribute.name}
}", 1, &loggerArg[0], "Setter"); | 165 contextData->activityLogger()->log("{{interface_name}}.{{attribute.name}
}", 1, &loggerArg[0], "Setter"); |
| 163 } | 166 } |
| 164 {% endif %} | 167 {% endif %} |
| 165 {% if attribute.has_custom_setter %} | 168 {% if attribute.has_custom_setter %} |
| 166 {{v8_class_name}}::{{attribute.name}}AttributeSetterCustom(name, jsValue, in
fo); | 169 {{v8_class_name}}::{{attribute.name}}AttributeSetterCustom(name, jsValue, in
fo); |
| 167 {% else %} | 170 {% else %} |
| 168 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffi
x}}(name, jsValue, info); | 171 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffi
x}}(name, jsValue, info); |
| 169 {% endif %} | 172 {% endif %} |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 171 } | 174 } |
| 172 {% endfilter %} | 175 {% endfilter %} |
| 173 {% endmacro %} | 176 {% endmacro %} |
| OLD | NEW |