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

Unified Diff: third_party/WebKit/Source/core/probe/CoreProbes.cpp

Issue 2847703002: Make ExecutionContext aware about how it can return CoreProbeSink (Closed)
Patch Set: . 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/probe/CoreProbes.cpp
diff --git a/third_party/WebKit/Source/core/probe/CoreProbes.cpp b/third_party/WebKit/Source/core/probe/CoreProbes.cpp
index 40fcaf9810929ba6c938d1fdb361897778c40d47..fb0477cea5b03593ae1caa19cb1de556f4263c9d 100644
--- a/third_party/WebKit/Source/core/probe/CoreProbes.cpp
+++ b/third_party/WebKit/Source/core/probe/CoreProbes.cpp
@@ -41,11 +41,8 @@
#include "core/inspector/InspectorTraceEvents.h"
#include "core/inspector/MainThreadDebugger.h"
#include "core/inspector/ThreadDebugger.h"
-#include "core/inspector/WorkerInspectorController.h"
#include "core/page/Page.h"
-#include "core/workers/MainThreadWorkletGlobalScope.h"
#include "core/workers/WorkerGlobalScope.h"
-#include "core/workers/WorkerThread.h"
#include "platform/instrumentation/tracing/TraceEvent.h"
#include "platform/loader/fetch/FetchInitiatorInfo.h"
@@ -139,22 +136,5 @@ void ContinueWithPolicyIgnore(LocalFrame* frame,
DidReceiveResourceResponseButCanceled(frame, loader, identifier, r, resource);
}
-CoreProbeSink* ToCoreProbeSink(WorkerGlobalScope* worker_global_scope) {
- if (!worker_global_scope)
- return nullptr;
- if (WorkerInspectorController* controller =
- worker_global_scope->GetThread()->GetWorkerInspectorController())
- return controller->InstrumentingAgents();
- return nullptr;
-}
-
-CoreProbeSink* ToCoreProbeSinkForNonDocumentContext(ExecutionContext* context) {
- if (context->IsWorkerGlobalScope())
- return ToCoreProbeSink(ToWorkerGlobalScope(context));
- if (context->IsMainThreadWorkletGlobalScope())
- return ToCoreProbeSink(ToMainThreadWorkletGlobalScope(context)->GetFrame());
- return nullptr;
-}
-
} // namespace probe
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698