Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| index 7beac6ec3c7705d0f26b08b3686cf4a048e6fb66..38a28464c71f6a1725298594f768ae6b9d0d16b3 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp |
| @@ -609,9 +609,7 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callAsConstructor( |
| CHECK(constructor->IsFunction()); |
| v8::Local<v8::Function> function = constructor.As<v8::Function>(); |
| - if (!depth) |
| - TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", |
| - InspectorFunctionCallEvent::data(context, function)); |
| + probe::CallFunction probe(context, function, depth); |
|
alph
2017/03/08 01:32:01
Let's have it within MicrotasksScope.
|
| v8::MicrotasksScope microtasksScope(isolate, |
| v8::MicrotasksScope::kRunMicrotasks); |
| ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); |
| @@ -619,8 +617,6 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callAsConstructor( |
| constructor->CallAsConstructor(isolate->GetCurrentContext(), argc, argv); |
| CHECK(!isolate->IsDead()); |
| ThreadDebugger::didExecuteScript(isolate); |
| - if (!depth) |
| - TRACE_EVENT_END0("devtools.timeline", "FunctionCall"); |
| return result; |
| } |
| @@ -647,9 +643,7 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction( |
| throwScriptForbiddenException(isolate); |
| return v8::MaybeLocal<v8::Value>(); |
| } |
| - if (!depth) |
| - TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", |
| - InspectorFunctionCallEvent::data(context, function)); |
| + probe::CallFunction probe(context, function, depth); |
|
alph
2017/03/08 01:32:01
ditto
|
| DCHECK(!frame || |
| BindingSecurity::shouldAllowAccessToFrame( |
| @@ -658,14 +652,12 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction( |
| CHECK(!ThreadState::current()->isWrapperTracingForbidden()); |
| v8::MicrotasksScope microtasksScope(isolate, |
| v8::MicrotasksScope::kRunMicrotasks); |
| - probe::CallFunction probe(context, function); |
| ThreadDebugger::willExecuteScript(isolate, function->ScriptId()); |
| v8::MaybeLocal<v8::Value> result = |
| function->Call(isolate->GetCurrentContext(), receiver, argc, args); |
| CHECK(!isolate->IsDead()); |
| ThreadDebugger::didExecuteScript(isolate); |
| - if (!depth) |
| - TRACE_EVENT_END0("devtools.timeline", "FunctionCall"); |
| + |
| return result; |
| } |