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

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

Issue 1761663003: Revert of [DevTools] Postpone more agents instantiation until attached. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual Created 4 years, 10 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/InspectorWorkerAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp
index 808d9f33349efb9b79c11a8935be8852d58a9810..3ab12a765d9af26e0808b98df49f8f86c6df218e 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorWorkerAgent.cpp
@@ -46,15 +46,15 @@ static const char workerInspectionEnabled[] = "workerInspectionEnabled";
static const char autoconnectToWorkers[] = "autoconnectToWorkers";
};
-PassOwnPtrWillBeRawPtr<InspectorWorkerAgent> InspectorWorkerAgent::create(InspectedFrames* inspectedFrames)
+PassOwnPtrWillBeRawPtr<InspectorWorkerAgent> InspectorWorkerAgent::create(InspectedFrames* inspectedFrames, PageConsoleAgent* consoleAgent)
{
- return adoptPtrWillBeNoop(new InspectorWorkerAgent(inspectedFrames));
+ return adoptPtrWillBeNoop(new InspectorWorkerAgent(inspectedFrames, consoleAgent));
}
-InspectorWorkerAgent::InspectorWorkerAgent(InspectedFrames* inspectedFrames)
+InspectorWorkerAgent::InspectorWorkerAgent(InspectedFrames* inspectedFrames, PageConsoleAgent* consoleAgent)
: InspectorBaseAgent<InspectorWorkerAgent, protocol::Frontend::Worker>("Worker")
, m_inspectedFrames(inspectedFrames)
- , m_consoleAgent(nullptr)
+ , m_consoleAgent(consoleAgent)
{
}
@@ -132,11 +132,6 @@ void InspectorWorkerAgent::setTracingSessionId(const String& sessionId)
info.key->writeTimelineStartedEvent(sessionId, info.value.id);
}
-void InspectorWorkerAgent::setPageConsoleAgent(PageConsoleAgent* consoleAgent)
-{
- m_consoleAgent = consoleAgent;
-}
-
bool InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart()
{
return m_state->booleanProperty(WorkerAgentState::autoconnectToWorkers, false);
@@ -232,7 +227,6 @@ InspectorWorkerAgent::WorkerAgentClient::WorkerAgentClient(protocol::Frontend::W
{
ASSERT(!proxy->pageInspector());
}
-
InspectorWorkerAgent::WorkerAgentClient::~WorkerAgentClient()
{
ASSERT(!m_frontend);
@@ -263,7 +257,6 @@ void InspectorWorkerAgent::WorkerAgentClient::dispatchMessageFromWorker(const St
{
m_frontend->dispatchMessageFromWorker(m_id, message);
}
-
void InspectorWorkerAgent::WorkerAgentClient::workerConsoleAgentEnabled(WorkerGlobalScopeProxy* proxy)
{
m_consoleAgent->workerConsoleAgentEnabled(proxy);

Powered by Google App Engine
This is Rietveld 408576698