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 bb020d7f8abfe5f67149d78f76cc2b885655c7e3..36965863b21e48b08c1c70176621e1667ae3197d 100644 |
--- a/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp |
+++ b/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp |
@@ -32,11 +32,14 @@ |
#include "core/CoreProbeSink.h" |
#include "core/inspector/InspectorLogAgent.h" |
+#include "core/inspector/InspectorNetworkAgent.h" |
#include "core/inspector/InspectorTraceEvents.h" |
#include "core/inspector/WorkerThreadDebugger.h" |
#include "core/inspector/protocol/Protocol.h" |
+#include "core/loader/WorkerFetchContext.h" |
#include "core/probe/CoreProbes.h" |
#include "core/workers/WorkerBackingThread.h" |
+#include "core/workers/WorkerGlobalScope.h" |
#include "core/workers/WorkerReportingProxy.h" |
#include "core/workers/WorkerThread.h" |
#include "platform/WebThreadSupportingGC.h" |
@@ -72,6 +75,13 @@ void WorkerInspectorController::ConnectFrontend() { |
debugger_->ContextGroupId(thread_), nullptr); |
session_->Append( |
new InspectorLogAgent(thread_->GetConsoleMessageStorage(), nullptr)); |
+ if (thread_->GlobalScope()->IsWorkerGlobalScope()) { |
+ WorkerFetchContext* worker_fetch_contrext = |
+ ToWorkerGlobalScope(thread_->GlobalScope())->GetFetchContext(); |
+ if (worker_fetch_contrext) { |
+ session_->Append(InspectorNetworkAgent::Create(nullptr)); |
+ } |
+ } |
thread_->GetWorkerBackingThread().BackingThread().AddTaskObserver(this); |
} |