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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 2737863002: DevTools: move counter-related devtools.timeline trace events into probe:: probes. (Closed)
Patch Set: same Created 3 years, 9 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698