| Index: third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
|
| index d436ceaadbb2234c307152e1e93476353ab05822..416180b1d129576574614152d78fd98c31c8628b 100644
|
| --- a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
|
| @@ -39,6 +39,15 @@ namespace blink {
|
|
|
| static const int workerContextGroupId = 1;
|
|
|
| +WorkerThreadDebugger* WorkerThreadDebugger::from(v8::Isolate* isolate)
|
| +{
|
| + V8PerIsolateData* data = V8PerIsolateData::from(isolate);
|
| + if (!data->threadDebugger())
|
| + return nullptr;
|
| + ASSERT(data->threadDebugger()->isWorker());
|
| + return static_cast<WorkerThreadDebugger*>(data->threadDebugger());
|
| +}
|
| +
|
| WorkerThreadDebugger::WorkerThreadDebugger(WorkerThread* workerThread, v8::Isolate* isolate)
|
| : ThreadDebugger(isolate)
|
| , m_workerThread(workerThread)
|
| @@ -49,9 +58,14 @@ WorkerThreadDebugger::~WorkerThreadDebugger()
|
| {
|
| }
|
|
|
| -void WorkerThreadDebugger::setContextDebugData(v8::Local<v8::Context> context)
|
| +void WorkerThreadDebugger::contextCreated(v8::Local<v8::Context> context)
|
| +{
|
| + debugger()->contextCreated(V8ContextInfo(context, workerContextGroupId, true, m_workerThread->workerGlobalScope()->url().getString(), "", ""));
|
| +}
|
| +
|
| +void WorkerThreadDebugger::contextWillBeDestroyed(v8::Local<v8::Context> context)
|
| {
|
| - V8Debugger::setContextDebugData(context, "worker", workerContextGroupId);
|
| + debugger()->contextDestroyed(context);
|
| }
|
|
|
| int WorkerThreadDebugger::contextGroupId()
|
| @@ -79,7 +93,7 @@ void WorkerThreadDebugger::contextsToReport(int contextGroupId, V8ContextInfoVec
|
| {
|
| ASSERT(contextGroupId == workerContextGroupId);
|
| ScriptState* scriptState = m_workerThread->workerGlobalScope()->scriptController()->getScriptState();
|
| - contexts.append(V8ContextInfo(scriptState->context(), true, m_workerThread->workerGlobalScope()->url().getString(), "", ""));
|
| + contexts.append(V8ContextInfo(scriptState->context(), workerContextGroupId, true, m_workerThread->workerGlobalScope()->url().getString(), "", ""));
|
| }
|
|
|
| } // namespace blink
|
|
|