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..366d1086cc7001337faca078ae93ab66d78f35a4 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,21 +136,8 @@ 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) { |
dgozman
2017/04/28 00:06:38
Why not replace ToCoreProbeSink in CoreProbes.h as
kinuko
2017/04/28 03:16:26
Done.
|
- if (context->IsWorkerGlobalScope()) |
- return ToCoreProbeSink(ToWorkerGlobalScope(context)); |
- if (context->IsMainThreadWorkletGlobalScope()) |
- return ToCoreProbeSink(ToMainThreadWorkletGlobalScope(context)->GetFrame()); |
- return nullptr; |
+ return context->GetInstrumentingAgents(); |
} |
} // namespace probe |