| Index: src/inspector/v8-debugger.cc
|
| diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
|
| index 4505c26bef23c9bb50893903b9852b68996560db..5cd56b4a4105cf1cfcebb5841348fc9a63aa7e9d 100644
|
| --- a/src/inspector/v8-debugger.cc
|
| +++ b/src/inspector/v8-debugger.cc
|
| @@ -29,8 +29,11 @@
|
|
|
| V8DebuggerAgentImpl* agentForScript(V8InspectorImpl* inspector,
|
| v8::Local<v8::debug::Script> script) {
|
| - int contextId;
|
| - if (!script->ContextId().To(&contextId)) return nullptr;
|
| + v8::Local<v8::Value> contextData;
|
| + if (!script->ContextData().ToLocal(&contextData) || !contextData->IsInt32()) {
|
| + return nullptr;
|
| + }
|
| + int contextId = static_cast<int>(contextData.As<v8::Int32>()->Value());
|
| int contextGroupId = inspector->contextGroupId(contextId);
|
| if (!contextGroupId) return nullptr;
|
| return inspector->enabledDebuggerAgentForGroup(contextGroupId);
|
| @@ -216,12 +219,10 @@
|
| for (size_t i = 0; i < scripts.Size(); ++i) {
|
| v8::Local<v8::debug::Script> script = scripts.Get(i);
|
| if (!script->WasCompiled()) continue;
|
| - if (script->IsEmbedded()) {
|
| - result.push_back(V8DebuggerScript::Create(m_isolate, script, false));
|
| + v8::Local<v8::Value> contextData;
|
| + if (!script->ContextData().ToLocal(&contextData) || !contextData->IsInt32())
|
| continue;
|
| - }
|
| - int contextId;
|
| - if (!script->ContextId().To(&contextId)) continue;
|
| + int contextId = static_cast<int>(contextData.As<v8::Int32>()->Value());
|
| if (m_inspector->contextGroupId(contextId) != contextGroupId) continue;
|
| result.push_back(V8DebuggerScript::Create(m_isolate, script, false));
|
| }
|
|
|