Index: src/debug/debug.cc |
diff --git a/src/debug/debug.cc b/src/debug/debug.cc |
index 55837342eb9e9547ea300f6d331fbe519ddfc1b9..926c08390b6f2508724fd28d1e2525a717c3db20 100644 |
--- a/src/debug/debug.cc |
+++ b/src/debug/debug.cc |
@@ -580,8 +580,12 @@ void Debug::Break(Arguments args, JavaScriptFrame* frame) { |
PostponeInterruptsScope postpone(isolate_); |
// Get the debug info (create it if it does not exist). |
- Handle<SharedFunctionInfo> shared = |
- Handle<SharedFunctionInfo>(frame->function()->shared()); |
+ Handle<JSFunction> function(frame->function()); |
+ Handle<SharedFunctionInfo> shared(function->shared()); |
+ if (!EnsureDebugInfo(shared, function)) { |
+ // Return if we failed to retrieve the debug info. |
+ return; |
+ } |
Handle<DebugInfo> debug_info(shared->GetDebugInfo()); |
// Find the break point where execution has stopped. |