| 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..8d10849955c0d85ba2c6a7ac8eabf0a3a14ebee9 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
|
| @@ -609,18 +609,14 @@ 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));
|
| v8::MicrotasksScope microtasksScope(isolate,
|
| v8::MicrotasksScope::kRunMicrotasks);
|
| + probe::CallFunction probe(context, function, depth);
|
| ThreadDebugger::willExecuteScript(isolate, function->ScriptId());
|
| v8::MaybeLocal<v8::Value> result =
|
| 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,6 @@ 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));
|
|
|
| DCHECK(!frame ||
|
| BindingSecurity::shouldAllowAccessToFrame(
|
| @@ -658,14 +651,13 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(
|
| CHECK(!ThreadState::current()->isWrapperTracingForbidden());
|
| v8::MicrotasksScope microtasksScope(isolate,
|
| v8::MicrotasksScope::kRunMicrotasks);
|
| - probe::CallFunction probe(context, function);
|
| + probe::CallFunction probe(context, function, depth);
|
| 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;
|
| }
|
|
|
|
|