Index: src/inspector/v8-debugger-agent-impl.cc |
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc |
index 431c297a744888b244eaec5a3ec4ac42c11693be..8af7d5243418c7e559b1b5ce5d7fa2087d9a1217 100644 |
--- a/src/inspector/v8-debugger-agent-impl.cc |
+++ b/src/inspector/v8-debugger-agent-impl.cc |
@@ -456,11 +456,15 @@ Response V8DebuggerAgentImpl::getPossibleBreakpoints( |
} |
auto it = m_scripts.find(scriptId); |
if (it == m_scripts.end()) return Response::Error("Script not found"); |
- |
std::vector<v8::debug::BreakLocation> v8Locations; |
- if (!it->second->getPossibleBreakpoints( |
- v8Start, v8End, restrictToFunction.fromMaybe(false), &v8Locations)) { |
- return Response::InternalError(); |
+ { |
+ v8::HandleScope handleScope(m_isolate); |
+ v8::Local<v8::Context> debuggerContext = |
+ v8::debug::GetDebugContext(m_isolate); |
+ v8::Context::Scope contextScope(debuggerContext); |
+ v8::TryCatch tryCatch(m_isolate); |
+ it->second->getPossibleBreakpoints( |
jgruber
2017/05/02 07:00:23
For my understanding, why do we neither check the
kozy
2017/05/04 15:23:41
Reason of linked issue is lazy compilation of scri
jgruber
2017/05/04 15:26:39
I see, thanks for the explanation.
|
+ v8Start, v8End, restrictToFunction.fromMaybe(false), &v8Locations); |
} |
*locations = protocol::Array<protocol::Debugger::BreakLocation>::create(); |