| Index: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| index e7b111aaacfdc8813cf1facdba3e9ad121f0b7e6..5aba3b6887f4cf0c50715b952678371932a99f82 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| @@ -88,20 +88,11 @@ void V8RuntimeAgentImpl::evaluate(
|
| if (executionContextId.isJust()) {
|
| contextId = executionContextId.fromJust();
|
| } else {
|
| - InspectedContext* mainInGroup = nullptr;
|
| - if (const V8DebuggerImpl::ContextByIdMap* contexts = m_debugger->contextGroup(m_session->contextGroupId())) {
|
| - for (auto& idContext : *contexts) {
|
| - if (idContext.second->isMainInGroup()) {
|
| - mainInGroup = idContext.second;
|
| - break;
|
| - }
|
| - }
|
| - }
|
| - if (!mainInGroup) {
|
| + contextId = m_debugger->client()->ensureDefaultContextInGroup(m_session->contextGroupId());
|
| + if (!contextId) {
|
| *errorString = "Cannot find default execution context";
|
| return;
|
| }
|
| - contextId = mainInGroup->contextId();
|
| }
|
|
|
| InjectedScript* injectedScript = m_session->findInjectedScript(errorString, contextId);
|
|
|