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

Unified Diff: Source/bindings/templates/methods.cpp

Issue 58963002: IDL compiler: [ActivityLogging] for methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index cddc95d21289ca3839308948ca040e90ac5892c5..a1eca4c4bdf2ecd09e53d0f017b0f84875e1e1da 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -68,10 +68,17 @@ static void {{method.name}}Method(const v8::FunctionCallbackInfo<v8::Value>& inf
{##############################################################################}
-{% macro method_callback(method) %}
+{% macro method_callback(method, world_suffix) %}
static void {{method.name}}MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ {% if world_suffix in method.activity_logging_world_list %}
+ V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ if (contextData && contextData->activityLogger()) {
+ Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(info);
haraken 2013/11/05 06:27:37 Shall we use toNativeArguments(info, 0), and then
Nils Barth (inactive) 2013/11/05 06:40:57 Sounds good; will do in a followup!
+ contextData->activityLogger()->log("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data(), "Method");
+ }
+ {% endif %}
{{cpp_class_name}}V8Internal::{{method.name}}Method(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}

Powered by Google App Engine
This is Rietveld 408576698