Reviewers: Benedikt Meurer,

Description:
Debugger: correctly ensure debug info in Debug::Break.

[email protected]
BUG=chromium:517594
LOG=N

Please review this at https://codereview.chromium.org/1286143002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+6, -3 lines):
  M src/compiler.cc
  M src/debug/debug.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 8a0ea19b62caf3a70e1d929fa1b698cd2d07fd49..5c131059f13febe36f21594ad197884b4aed2b06 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1053,7 +1053,6 @@ void Compiler::CompileForLiveEdit(Handle<Script> script) {
   PostponeInterruptsScope postpone(info.isolate());
   VMState<COMPILER> state(info.isolate());

-  // Get rid of old list of shared function infos.
   info.MarkAsFirstCompile();
   info.parse_info()->set_global();
   if (!Parser::ParseStatic(info.parse_info())) return;
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.


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to