Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: src/debug/debug.cc

Issue 1286143002: Debugger: correctly ensure debug info in Debug::Break. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698