Chromium Code Reviews| 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 266b360b108d305ce89987d631c09a3da1ec947a..ed1a6a1c846012c94d6bf78c333dafea966b6fe2 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 %} |
|
haraken
2017/02/23 04:30:20
What is this change for?
dcheng
2017/02/23 04:55:41
This needs to be done after the security check; ot
haraken
2017/02/23 09:26:24
Hmm.
Then you will need to make a similar change
dcheng
2017/02/23 09:44:43
As far as I know, it's only a problem for methods
|
| + {% 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 %} |
| - {% 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 %} |