Index: third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp |
diff --git a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp |
index 204b90e92cca523e18cac520e64ca2e373cf11ef..4944871747e1c31327e6f280918249e26e453887 100644 |
--- a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp |
+++ b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp |
@@ -33,11 +33,20 @@ WorkerInspectorProxy::~WorkerInspectorProxy() |
{ |
} |
+WorkerThreadStartMode WorkerInspectorProxy::workerStartMode(ExecutionContext* context) |
+{ |
+ if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(context)) |
+ return PauseWorkerGlobalScopeOnStart; |
+ return DontPauseWorkerGlobalScopeOnStart; |
+} |
+ |
void WorkerInspectorProxy::workerThreadCreated(ExecutionContext* context, WorkerThread* workerThread, const KURL& url) |
{ |
m_workerThread = workerThread; |
m_executionContext = context; |
- InspectorInstrumentation::didStartWorker(context, this, url); |
+ // We expect everyone starting worker thread to synchronously ask for workerStartMode right before. |
+ bool pausedOnStart = InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(context); |
pfeldman
2016/02/09 22:42:56
So you are passing the value you got back into ins
dgozman
2016/02/09 23:45:28
Otherwise instrumenting agent must assume shouldPa
|
+ InspectorInstrumentation::didStartWorker(context, this, url, pausedOnStart); |
} |
void WorkerInspectorProxy::workerThreadTerminated() |