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

Unified Diff: third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp

Issue 1924173002: [DevTools] Improve performance of InstrumentingAgents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile 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
Index: third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
diff --git a/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp b/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
index 91001cbe0140d61931774d92ca46819f36829869..50909941c167e819eef5435aee53098a11bbd0f3 100644
--- a/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
+++ b/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
@@ -30,11 +30,11 @@
#include "core/inspector/WorkerInspectorController.h"
+#include "core/InstrumentingAgents.h"
#include "core/inspector/InspectorConsoleAgent.h"
#include "core/inspector/InspectorHeapProfilerAgent.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorProfilerAgent.h"
-#include "core/inspector/InspectorTaskRunner.h"
#include "core/inspector/WorkerConsoleAgent.h"
#include "core/inspector/WorkerDebuggerAgent.h"
#include "core/inspector/WorkerRuntimeAgent.h"
@@ -60,7 +60,7 @@ WorkerInspectorController* WorkerInspectorController::create(WorkerGlobalScope*
WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGlobalScope, WorkerThreadDebugger* debugger)
: m_debugger(debugger)
, m_workerGlobalScope(workerGlobalScope)
- , m_instrumentingSessions(new InstrumentingSessions())
+ , m_instrumentingAgents(new InstrumentingAgents())
{
}
@@ -74,7 +74,7 @@ void WorkerInspectorController::connectFrontend()
return;
// sessionId will be overwritten by WebDevToolsAgent::sendProtocolNotifications call.
- m_session = new InspectorSession(this, nullptr, 0, true /* autoFlush */);
+ m_session = new InspectorSession(this, nullptr, m_instrumentingAgents.get(), 0, true /* autoFlush */);
m_v8Session = m_debugger->debugger()->connect(m_debugger->contextGroupId());
m_session->append(WorkerRuntimeAgent::create(m_v8Session->runtimeAgent(), m_workerGlobalScope, this));
@@ -83,7 +83,6 @@ void WorkerInspectorController::connectFrontend()
m_session->append(InspectorHeapProfilerAgent::create(m_v8Session->heapProfilerAgent()));
m_session->append(WorkerConsoleAgent::create(m_v8Session->runtimeAgent(), m_workerGlobalScope));
- m_instrumentingSessions->add(m_session);
m_session->attach(m_v8Session.get(), nullptr);
}
@@ -92,7 +91,6 @@ void WorkerInspectorController::disconnectFrontend()
if (!m_session)
return;
m_session->detach();
- m_instrumentingSessions->remove(m_session);
m_v8Session.clear();
m_session.clear();
}
@@ -122,7 +120,7 @@ void WorkerInspectorController::sendProtocolMessage(int sessionId, int callId, c
DEFINE_TRACE(WorkerInspectorController)
{
visitor->trace(m_workerGlobalScope);
- visitor->trace(m_instrumentingSessions);
+ visitor->trace(m_instrumentingAgents);
visitor->trace(m_session);
}

Powered by Google App Engine
This is Rietveld 408576698