| 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 58de4e9b75f3d0178c283bacc31eb8c97c9f4b5d..ce8923e24e658f47dd2d778ddaa5b1b344c87785 100644
|
| --- a/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
|
| @@ -50,23 +50,18 @@
|
|
|
| namespace blink {
|
|
|
| -WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGlobalScope)
|
| +PassRefPtrWillBeRawPtr<WorkerInspectorController> WorkerInspectorController::create(WorkerGlobalScope* workerGlobalScope)
|
| +{
|
| + WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(workerGlobalScope->thread()->isolate());
|
| + return debugger ? adoptRefWillBeNoop(new WorkerInspectorController(workerGlobalScope, debugger->debugger(), debugger->contextGroupId())) : nullptr;
|
| +}
|
| +
|
| +WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGlobalScope, V8Debugger* debugger, int contextGroupId)
|
| : m_workerGlobalScope(workerGlobalScope)
|
| , m_instrumentingAgents(InstrumentingAgents::create())
|
| , m_agents(m_instrumentingAgents.get())
|
| {
|
| - v8::Isolate* isolate = workerGlobalScope->thread()->isolate();
|
| - V8PerIsolateData* data = V8PerIsolateData::from(isolate);
|
| -
|
| - if (data->threadDebugger()) {
|
| - ASSERT(data->threadDebugger()->isWorker());
|
| - } else {
|
| - data->setThreadDebugger(adoptPtr(new WorkerThreadDebugger(workerGlobalScope->thread(), isolate)));
|
| - }
|
| -
|
| - V8Debugger* debugger = data->threadDebugger()->debugger();
|
| -
|
| - OwnPtrWillBeRawPtr<WorkerRuntimeAgent> workerRuntimeAgent = WorkerRuntimeAgent::create(debugger, workerGlobalScope, this, WorkerThreadDebugger::contextGroupId());
|
| + OwnPtrWillBeRawPtr<WorkerRuntimeAgent> workerRuntimeAgent = WorkerRuntimeAgent::create(debugger, workerGlobalScope, this, contextGroupId);
|
| m_workerRuntimeAgent = workerRuntimeAgent.get();
|
| m_agents.append(workerRuntimeAgent.release());
|
|
|
| @@ -75,7 +70,7 @@ WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGl
|
| m_agents.append(workerDebuggerAgent.release());
|
|
|
| m_agents.append(InspectorProfilerAgent::create(debugger, 0));
|
| - m_agents.append(InspectorHeapProfilerAgent::create(isolate, m_workerRuntimeAgent->v8Agent()));
|
| + m_agents.append(InspectorHeapProfilerAgent::create(workerGlobalScope->thread()->isolate(), m_workerRuntimeAgent->v8Agent()));
|
|
|
| OwnPtrWillBeRawPtr<WorkerConsoleAgent> workerConsoleAgent = WorkerConsoleAgent::create(m_workerRuntimeAgent->v8Agent(), workerGlobalScope);
|
| WorkerConsoleAgent* workerConsoleAgentPtr = workerConsoleAgent.get();
|
|
|