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

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

Issue 2900613002: Support DevTools for off-main-thread-fetch (Closed)
Patch Set: Created 3 years, 7 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 bb020d7f8abfe5f67149d78f76cc2b885655c7e3..5fba5de156ec9b1c7cb65077cacf633eb92548ca 100644
--- a/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
+++ b/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
@@ -32,13 +32,17 @@
#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/RuntimeEnabledFeatures.h"
#include "platform/WebThreadSupportingGC.h"
namespace blink {
@@ -72,6 +76,12 @@ void WorkerInspectorController::ConnectFrontend() {
debugger_->ContextGroupId(thread_), nullptr);
session_->Append(
new InspectorLogAgent(thread_->GetConsoleMessageStorage(), nullptr));
+ if (thread_->GlobalScope()->IsWorkerGlobalScope() &&
+ RuntimeEnabledFeatures::offMainThreadFetchEnabled()) {
+ DCHECK(ToWorkerGlobalScope(thread_->GlobalScope())->GetFetchContext());
+ session_->Append(InspectorNetworkAgent::CreateForWorker(
+ ToWorkerGlobalScope(thread_->GlobalScope())));
+ }
thread_->GetWorkerBackingThread().BackingThread().AddTaskObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698