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

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

Issue 257803006: Fixing wrong extension ID in Activity Log entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 years, 6 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 {# Overloaded methods have length checked during overload resolution #} 10 {# Overloaded methods have length checked during overload resolution #}
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
394 {% if not method.overloads %}{# Overloaded methods are measured in overload_ resolution_method() #} 394 {% if not method.overloads %}{# Overloaded methods are measured in overload_ resolution_method() #}
395 {% if method.measure_as %} 395 {% if method.measure_as %}
396 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ method.measure_as}}); 396 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ method.measure_as}});
397 {% endif %} 397 {% endif %}
398 {% if method.deprecate_as %} 398 {% if method.deprecate_as %}
399 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{method.deprecate_as}}); 399 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{method.deprecate_as}});
400 {% endif %} 400 {% endif %}
401 {% endif %}{# not method.overloads #} 401 {% endif %}{# not method.overloads #}
402 {% if world_suffix in method.activity_logging_world_list %} 402 {% if world_suffix in method.activity_logging_world_list %}
403 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate()); 403 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
404 if (world.activityLogger()) { 404 if (contextData && contextData->activityLogger()) {
405 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) 405 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0)
406 and delete toVectorOfArguments #} 406 and delete toVectorOfArguments #}
407 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 407 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
408 world.activityLogger()->logMethod("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data()); 408 contextData->activityLogger()->logMethod("{{interface_name}}.{{method.na me}}", info.Length(), loggerArgs.data());
409 } 409 }
410 {% endif %} 410 {% endif %}
411 {% if method.is_custom %} 411 {% if method.is_custom %}
412 {{v8_class}}::{{method.name}}MethodCustom(info); 412 {{v8_class}}::{{method.name}}MethodCustom(info);
413 {% else %} 413 {% else %}
414 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info); 414 {{cpp_class}}V8Internal::{{method.name}}Method{{world_suffix}}(info);
415 {% endif %} 415 {% endif %}
416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
417 } 417 }
418 {% endfilter %} 418 {% endfilter %}
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 {% endif %} 553 {% endif %}
554 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons tructor.argument_list | join(', ')}}); 554 {{constructor.cpp_type}} impl = {{cpp_class}}::createForJSConstructor({{cons tructor.argument_list | join(', ')}});
555 {% if is_constructor_raises_exception %} 555 {% if is_constructor_raises_exception %}
556 if (exceptionState.throwIfNeeded()) 556 if (exceptionState.throwIfNeeded())
557 return; 557 return;
558 {% endif %} 558 {% endif %}
559 559
560 {{generate_constructor_wrapper(constructor) | indent}} 560 {{generate_constructor_wrapper(constructor) | indent}}
561 } 561 }
562 {% endmacro %} 562 {% endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698