Commit b571c6d1 authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[inspector] speculative avoid using debugger context as current in blink

Now we run nested message loop with debugger context as current one.

BUG=chromium:676749
R=yangguo@chromium.org,dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2604553002
Cr-Commit-Position: refs/heads/master@{#41937}
parent 833d2c4b
......@@ -488,6 +488,10 @@ void V8Debugger::handleProgramBreak(v8::Local<v8::Context> pausedContext,
m_runningNestedMessageLoop = true;
int groupId = m_inspector->contextGroupId(pausedContext);
DCHECK(groupId);
v8::Context::Scope scope(pausedContext);
v8::Local<v8::Context> context = m_isolate->GetCurrentContext();
CHECK(!context.IsEmpty() &&
context != v8::Debug::GetDebugContext(m_isolate));
m_inspector->client()->runMessageLoopOnPause(groupId);
// The agent may have been removed in the nested loop.
agent = m_inspector->enabledDebuggerAgentForGroup(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment