Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: Source/bindings/templates/methods.cpp

Issue 213783002: Pass current value of attributes to WebDOMActivityLogger Setter logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Working Version Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {##############################################################################} 1 {##############################################################################}
2 {% macro generate_method(method, world_suffix) %} 2 {% macro generate_method(method, world_suffix) %}
3 {% filter conditional(method.conditional_string) %} 3 {% filter conditional(method.conditional_string) %}
4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
5 { 5 {
6 {# Local variables #} 6 {# Local variables #}
7 {% if method.has_exception_state %} 7 {% if method.has_exception_state %}
8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na me}}", "{{interface_name}}", info.Holder(), info.GetIsolate());
9 {% endif %} 9 {% endif %}
10 {% if method.number_of_required_arguments %} 10 {% if method.number_of_required_arguments %}
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 {% endif %} 299 {% endif %}
300 {% if method.deprecate_as %} 300 {% if method.deprecate_as %}
301 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{method.deprecate_as}}); 301 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{method.deprecate_as}});
302 {% endif %} 302 {% endif %}
303 {% if world_suffix in method.activity_logging_world_list %} 303 {% if world_suffix in method.activity_logging_world_list %}
304 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 304 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
305 if (contextData && contextData->activityLogger()) { 305 if (contextData && contextData->activityLogger()) {
306 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) 306 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0)
307 and delete toVectorOfArguments #} 307 and delete toVectorOfArguments #}
308 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 308 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
309 contextData->activityLogger()->log("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data(), "Method"); 309 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na me}}", info.Length(), loggerArgs.data());
310 } 310 }
311 {% endif %} 311 {% endif %}
312 {% if method.is_custom %} 312 {% if method.is_custom %}
313 {{v8_class}}::{{method.name}}MethodCustom(info); 313 {{v8_class}}::{{method.name}}MethodCustom(info);
314 {% else %} 314 {% else %}
315 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); 315 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info);
316 {% endif %} 316 {% endif %}
317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
318 } 318 }
319 {% endfilter %} 319 {% endfilter %}
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 {% endfor %} 452 {% endfor %}
453 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons tructor.argument_list | join(', ')}}); 453 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons tructor.argument_list | join(', ')}});
454 {% if is_constructor_raises_exception %} 454 {% if is_constructor_raises_exception %}
455 if (exceptionState.throwIfNeeded()) 455 if (exceptionState.throwIfNeeded())
456 return; 456 return;
457 {% endif %} 457 {% endif %}
458 458
459 {{generate_constructor_wrapper(constructor) | indent}} 459 {{generate_constructor_wrapper(constructor) | indent}}
460 } 460 }
461 {% endmacro %} 461 {% endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698