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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2721693002: Revert of Switch RemoteWindowProxy to use v8::Context::NewRemoteContext. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 004c06040ca379329ea3ad058bb8a086f7ca9965..266b360b108d305ce89987d631c09a3da1ec947a 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -78,22 +78,12 @@
}
{% endif %}
- {% set log_activity = world_suffix in method.activity_logging_world_list %}
- {% if 'scriptState' in function_call or log_activity %}
+ {% if 'scriptState' in function_call %}
{% if method.is_static %}
ScriptState* scriptState = ScriptState::forFunctionObject(info);
{% else %}
ScriptState* scriptState = ScriptState::forReceiverObject(info);
{% endif %}
- {% endif %}
-
- {% if log_activity %}
- V8PerContextData* contextData = scriptState->perContextData();
- if (contextData && contextData->activityLogger()) {
- ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{method.name}}");
- Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState);
- contextData->activityLogger()->logMethod("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data());
- }
{% endif %}
{% if method.is_custom_element_callbacks %}
@@ -521,6 +511,19 @@
Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
{% endif %}
{% endif %}{# not method.overloads #}
+ {% if world_suffix in method.activity_logging_world_list %}
+ {% if method.is_static %}
+ ScriptState* scriptState = ScriptState::forFunctionObject(info);
+ {% else %}
+ ScriptState* scriptState = ScriptState::forReceiverObject(info);
+ {% endif %}
+ V8PerContextData* contextData = scriptState->perContextData();
+ if (contextData && contextData->activityLogger()) {
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "{{interface_name}}", "{{method.name}}");
+ Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState);
+ contextData->activityLogger()->logMethod("{{interface_name}}.{{method.name}}", info.Length(), loggerArgs.data());
+ }
+ {% endif %}
{% if method.is_ce_reactions %}
CEReactionsScope ceReactionsScope;
{% endif %}

Powered by Google App Engine
This is Rietveld 408576698