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

Unified Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 1907663005: [DevTools] Move v8-related instrumentation from agents to InspectorSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1889533002
Patch Set: profiler agent restore starts instrumenting Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSessionClient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
index 4883ec22f72c34913262c55de746e386e6e3efe2..ed36971a126ca0d93e2f961822942734eb8e1251 100644
--- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
@@ -377,7 +377,7 @@ void WebDevToolsAgentImpl::willBeDestroyed()
void WebDevToolsAgentImpl::initializeSession(int sessionId, const String& hostId)
{
- m_session = new InspectorSession(this, sessionId, false /* autoFlush */);
+ m_session = new InspectorSession(this, m_inspectedFrames.get(), sessionId, false /* autoFlush */);
ClientMessageLoopAdapter::ensureMainThreadDebuggerCreated(m_client);
MainThreadDebugger* mainThreadDebugger = MainThreadDebugger::instance();
@@ -488,7 +488,7 @@ void WebDevToolsAgentImpl::attach(const WebString& hostId, int sessionId)
if (attached())
return;
initializeSession(sessionId, hostId);
- m_session->attach(nullptr);
+ m_session->attach(m_v8Session.get(), nullptr);
}
void WebDevToolsAgentImpl::reattach(const WebString& hostId, int sessionId, const WebString& savedState)
@@ -497,7 +497,7 @@ void WebDevToolsAgentImpl::reattach(const WebString& hostId, int sessionId, cons
return;
initializeSession(sessionId, hostId);
String state = savedState;
- m_session->attach(&state);
+ m_session->attach(m_v8Session.get(), &state);
}
void WebDevToolsAgentImpl::detach()
@@ -654,20 +654,14 @@ void WebDevToolsAgentImpl::willProcessTask()
{
if (!attached())
return;
- for (InspectorSession* session : *m_instrumentingSessions) {
- if (InspectorProfilerAgent* profilerAgent = session->instrumentingAgents()->inspectorProfilerAgent())
- profilerAgent->willProcessTask();
- }
+ InspectorInstrumentation::willProcessTask(m_inspectedFrames->root());
}
void WebDevToolsAgentImpl::didProcessTask()
{
if (!attached())
return;
- for (InspectorSession* session : *m_instrumentingSessions) {
- if (InspectorProfilerAgent* profilerAgent = session->instrumentingAgents()->inspectorProfilerAgent())
- profilerAgent->didProcessTask();
- }
+ InspectorInstrumentation::didProcessTask(m_inspectedFrames->root());
flushPendingProtocolNotifications();
}
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSessionClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698