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

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

Issue 2626183003: Switch RemoteWindowProxy to use v8::Context::NewRemoteContext. (Closed)
Patch Set: Another comment 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 a036d5839d10565c153094f907d8123dcc7e408e..e97529936e21214252741f9969017a2e25b6f0bc 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -78,6 +78,20 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
}
{% endif %}
+ {% 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 'scriptState' in function_call %}
{% if method.is_static %}
ScriptState* scriptState = ScriptState::forFunctionObject(info);
@@ -511,19 +525,6 @@ void {{v8_class_or_partial}}::{{method.name}}MethodCallback{{world_suffix}}(cons
Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
{% endif %}
{% endif %}{# not method.overloads #}
- {% if world_suffix in method.activity_logging_world_list %}
dcheng 2017/02/17 07:30:42 Also, I had to move the activity logging helper: f
Yuki 2017/02/17 10:53:17 AFAIK, no cross origin accessible property uses a
dcheng 2017/02/17 10:57:00 It happens when you do something this: window.ope
Yuki 2017/02/17 11:24:49 I see. Then, I'm okay with moving this, although
- {% 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