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

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

Issue 2816403002: test all
Patch Set: fix sharedworker Created 3 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 5b1a80933b4fcc1f21ddce3d7881c750c26c436a..47f5437ed34ed7174b14c0627a5f4547215e9c5c 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"
@@ -74,6 +77,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())->FetchContext();
+ if (worker_fetch_contrext) {
+ session_->Append(InspectorNetworkAgent::Create(nullptr));
+ }
+ }
thread_->GetWorkerBackingThread().BackingThread().AddTaskObserver(this);
}
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp ('k') | third_party/WebKit/Source/core/loader/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698