Commit 6882c91e authored by alph's avatar alph Committed by Commit bot

[inspector] Record EvaluateScript trace event upon console evaluation

It will allow timeline to show JS profile on code evaluated from console.

BUG=chromium:655430

Review-Url: https://codereview.chromium.org/2413943002
Cr-Commit-Position: refs/heads/master@{#40289}
parent 7ba222ff
include_rules = [
"-src",
"+src/inspector",
"+src/base/atomicops.h",
"+src/base/macros.h",
"+src/base/logging.h",
"+src/base/platform/platform.h",
"+src/inspector",
"+src/tracing",
]
......@@ -41,6 +41,7 @@
#include "src/inspector/v8-inspector-impl.h"
#include "src/inspector/v8-inspector-session-impl.h"
#include "src/inspector/v8-stack-trace-impl.h"
#include "src/tracing/trace-event.h"
#include "include/v8-inspector.h"
......@@ -272,6 +273,8 @@ void V8RuntimeAgentImpl::evaluate(
const Maybe<bool>& generatePreview, const Maybe<bool>& userGesture,
const Maybe<bool>& awaitPromise,
std::unique_ptr<EvaluateCallback> callback) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"),
"EvaluateScript");
ErrorString errorString;
int contextId =
ensureContext(&errorString, m_inspector, m_session->contextGroupId(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment