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 2810d5765a57e2d5e29174a25039cb7a92e6f2c3..f1b688f8aea917a070cd7990c218800757268352 100644 |
--- a/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp |
+++ b/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp |
@@ -42,7 +42,7 @@ |
#include "core/inspector/WorkerThreadDebugger.h" |
#include "core/workers/WorkerGlobalScope.h" |
#include "core/workers/WorkerReportingProxy.h" |
-#include "core/workers/WorkerThread.h" |
+#include "core/workers/WorkerScript.h" |
#include "platform/inspector_protocol/Dispatcher.h" |
#include "platform/inspector_protocol/Frontend.h" |
#include "platform/inspector_protocol/FrontendChannel.h" |
@@ -55,20 +55,20 @@ namespace { |
class RunInspectorCommandsTask final : public InspectorTaskRunner::Task { |
public: |
- explicit RunInspectorCommandsTask(WorkerThread* thread) |
- : m_thread(thread) { } |
+ explicit RunInspectorCommandsTask(WorkerScript* script) |
+ : m_script(script) { } |
~RunInspectorCommandsTask() override { } |
void run() override |
{ |
// Process all queued debugger commands. WorkerThread is certainly |
// alive if this task is being executed. |
- m_thread->willRunDebuggerTasks(); |
- while (WorkerThread::TaskReceived == m_thread->runDebuggerTask(WorkerThread::DontWaitForTask)) { } |
- m_thread->didRunDebuggerTasks(); |
+ m_script->willRunDebuggerTasks(); |
+ while (WorkerScript::TaskReceived == m_script->runDebuggerTask(WorkerScript::DontWaitForTask)) { } |
+ m_script->didRunDebuggerTasks(); |
} |
private: |
- WorkerThread* m_thread; |
+ WorkerScript* m_script; |
}; |
} // namespace |
@@ -96,11 +96,11 @@ private: |
void sendProtocolResponse(int sessionId, int callId, PassRefPtr<JSONObject> message) override |
{ |
// Worker messages are wrapped, no need to handle callId. |
- m_workerGlobalScope->thread()->workerReportingProxy().postMessageToPageInspector(message->toJSONString()); |
+ m_workerGlobalScope->workerScript()->workerReportingProxy().postMessageToPageInspector(message->toJSONString()); |
} |
void sendProtocolNotification(PassRefPtr<JSONObject> message) override |
{ |
- m_workerGlobalScope->thread()->workerReportingProxy().postMessageToPageInspector(message->toJSONString()); |
+ m_workerGlobalScope->workerScript()->workerReportingProxy().postMessageToPageInspector(message->toJSONString()); |
} |
void flush() override { } |
@@ -115,14 +115,14 @@ WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGl |
, m_beforeInitlizedScope(adoptPtr(new InspectorTaskRunner::IgnoreInterruptsScope(m_inspectorTaskRunner.get()))) |
, m_paused(false) |
{ |
- v8::Isolate* isolate = workerGlobalScope->thread()->isolate(); |
+ v8::Isolate* isolate = workerGlobalScope->workerScript()->isolate(); |
V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
ThreadDebugger* threadDebugger = data->threadDebugger(); |
if (threadDebugger) { |
ASSERT(threadDebugger->isWorker()); |
m_workerThreadDebugger = static_cast<WorkerThreadDebugger*>(threadDebugger); |
} else { |
- OwnPtr<WorkerThreadDebugger> newDebugger = adoptPtr(new WorkerThreadDebugger(workerGlobalScope->thread())); |
+ OwnPtr<WorkerThreadDebugger> newDebugger = adoptPtr(new WorkerThreadDebugger(workerGlobalScope->workerScript())); |
m_workerThreadDebugger = newDebugger.get(); |
data->setThreadDebugger(newDebugger.release()); |
} |
@@ -206,7 +206,7 @@ void WorkerInspectorController::dispose() |
void WorkerInspectorController::interruptAndDispatchInspectorCommands() |
{ |
- m_inspectorTaskRunner->interruptAndRun(adoptPtr(new RunInspectorCommandsTask(m_workerGlobalScope->thread()))); |
+ m_inspectorTaskRunner->interruptAndRun(adoptPtr(new RunInspectorCommandsTask(m_workerGlobalScope->workerScript()))); |
} |
void WorkerInspectorController::resumeStartup() |