Chromium Code Reviews| Index: Source/bindings/templates/attributes.cpp |
| diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp |
| index d503e60014019dd4f707f9ae48b34c9fb68c7d4e..e6900a28375a8bbb8a2afdccaa955a078508b843 100644 |
| --- a/Source/bindings/templates/attributes.cpp |
| +++ b/Source/bindings/templates/attributes.cpp |
| @@ -171,7 +171,7 @@ v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info |
| {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
| V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext()); |
| if (contextData && contextData->activityLogger()) |
| - contextData->activityLogger()->log("{{interface_name}}.{{attribute.name}}", 0, 0, "Getter"); |
| + contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute.name}}"); |
| {% endif %} |
| {% if attribute.has_custom_getter %} |
| {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); |
| @@ -311,8 +311,19 @@ v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI |
| {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
| V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext()); |
| if (contextData && contextData->activityLogger()) { |
| - v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
| - contextData->activityLogger()->log("{{interface_name}}.{{attribute.name}}", 1, &loggerArg[0], "Setter"); |
| + {% if attribute.activity_logging_include_old_value_for_setter %} |
| + {{cpp_class}}* impl = {{v8_class}}::toNative(info.Holder()); |
| + {% if attribute.cpp_value_original %} |
| + {{attribute.cpp_type}} original = {{attribute.cpp_value_original}}; |
| + {% else %} |
| + {{attribute.cpp_type}} original = {{attribute.cpp_value}}; |
| + {% endif %} |
| + v8::Handle<v8::Value> originalValue = {{attribute.cpp_value_to_v8_value(cpp_value='original', isolate='info.GetIsolate()', creation_context='v8::Handle<v8::Object>()')}}; |
|
Nils Barth (inactive)
2014/04/23 01:12:02
Could you put the function call in the Python code
Devlin
2014/04/23 01:31:43
Yes. But I didn't because there's so much context
Nils Barth (inactive)
2014/04/23 03:04:42
That's a good point, but as a rule we're putting a
|
| + {% else %} |
| + {# If we don't log the old value, we send an empty value in its place. #} |
|
Nils Barth (inactive)
2014/04/23 01:12:02
Would it be clearer to overload logSetter so we ca
Devlin
2014/04/23 01:31:43
Sure. (Originally didn't because chrome doesn't l
Nils Barth (inactive)
2014/04/23 03:04:42
...at least for the next day or two ;)
|
| + v8::Handle<v8::Value> originalValue; |
| + {% endif %} |
| + contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute.name}}", v8Value, originalValue); |
| } |
| {% endif %} |
| {% if attribute.is_custom_element_callbacks or attribute.is_reflect %} |