From 83ddaa0df768e1dae2f414c27d5dc314a91cca96 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Fri, 17 Oct 2014 14:11:01 +0000 Subject: [PATCH] Fix break location calculation. R=ulan@chromium.org BUG=chromium:419663 LOG=Y Review URL: https://codereview.chromium.org/658723005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/debug.cc | 10 ++++----- test/mjsunit/regress/regress-419663.js | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 test/mjsunit/regress/regress-419663.js diff --git a/src/debug.cc b/src/debug.cc index 2329b25..15c1a8b 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1096,7 +1096,7 @@ bool Debug::SetBreakPoint(Handle function, it.FindBreakLocationFromPosition(*source_position, STATEMENT_ALIGNED); it.SetBreakPoint(break_point_object); - *source_position = it.position(); + *source_position = it.statement_position(); // At least one active break point now. return debug_info->GetBreakPointCount() > 0; @@ -1140,7 +1140,10 @@ bool Debug::SetBreakPointForScript(Handle