Commit 3eb65be7 authored by Danil Somsikov's avatar Danil Somsikov Committed by V8 LUCI CQ

Enable Profiler domain for the untrusted clients.

Bug: chromium:1350125
Change-Id: Ia89d01420e93e110a5da22f104f5b8afbdd2f558
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3882973
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83094}
parent e24cb41f
......@@ -127,11 +127,11 @@ V8InspectorSessionImpl::V8InspectorSessionImpl(
this, this, agentState(protocol::Console::Metainfo::domainName)));
protocol::Console::Dispatcher::wire(&m_dispatcher, m_consoleAgent.get());
if (m_clientTrustLevel == V8Inspector::kFullyTrusted) {
m_profilerAgent.reset(new V8ProfilerAgentImpl(
this, this, agentState(protocol::Profiler::Metainfo::domainName)));
protocol::Profiler::Dispatcher::wire(&m_dispatcher, m_profilerAgent.get());
m_profilerAgent.reset(new V8ProfilerAgentImpl(
this, this, agentState(protocol::Profiler::Metainfo::domainName)));
protocol::Profiler::Dispatcher::wire(&m_dispatcher, m_profilerAgent.get());
if (m_clientTrustLevel == V8Inspector::kFullyTrusted) {
m_heapProfilerAgent.reset(new V8HeapProfilerAgentImpl(
this, this, agentState(protocol::HeapProfiler::Metainfo::domainName)));
protocol::HeapProfiler::Dispatcher::wire(&m_dispatcher,
......@@ -145,7 +145,7 @@ V8InspectorSessionImpl::V8InspectorSessionImpl(
m_runtimeAgent->restore();
m_debuggerAgent->restore();
if (m_heapProfilerAgent) m_heapProfilerAgent->restore();
if (m_profilerAgent) m_profilerAgent->restore();
m_profilerAgent->restore();
m_consoleAgent->restore();
}
}
......@@ -154,7 +154,7 @@ V8InspectorSessionImpl::~V8InspectorSessionImpl() {
v8::Isolate::Scope scope(m_inspector->isolate());
discardInjectedScripts();
m_consoleAgent->disable();
if (m_profilerAgent) m_profilerAgent->disable();
m_profilerAgent->disable();
if (m_heapProfilerAgent) m_heapProfilerAgent->disable();
m_debuggerAgent->disable();
m_runtimeAgent->disable();
......@@ -503,8 +503,7 @@ V8InspectorSessionImpl::searchInTextByLines(StringView text, StringView query,
void V8InspectorSessionImpl::triggerPreciseCoverageDeltaUpdate(
StringView occasion) {
if (m_profilerAgent)
m_profilerAgent->triggerPreciseCoverageDeltaUpdate(toString16(occasion));
m_profilerAgent->triggerPreciseCoverageDeltaUpdate(toString16(occasion));
}
} // namespace v8_inspector
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