| Index: src/debug.cc
|
| diff --git a/src/debug.cc b/src/debug.cc
|
| index 2329b250f3e9ffdfd3e8bb5fac19f9a9958c505d..15c1a8bc709f791003917402a8efd6344dacb46a 100644
|
| --- a/src/debug.cc
|
| +++ b/src/debug.cc
|
| @@ -1096,7 +1096,7 @@ bool Debug::SetBreakPoint(Handle<JSFunction> 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<Script> script,
|
| it.FindBreakLocationFromPosition(position, alignment);
|
| it.SetBreakPoint(break_point_object);
|
|
|
| - *source_position = it.position() + shared->start_position();
|
| + position = (alignment == STATEMENT_ALIGNED) ? it.statement_position()
|
| + : it.position();
|
| +
|
| + *source_position = position + shared->start_position();
|
|
|
| // At least one active break point now.
|
| DCHECK(debug_info->GetBreakPointCount() > 0);
|
| @@ -1566,9 +1569,6 @@ Handle<Object> Debug::GetSourceBreakLocations(
|
| case BREAK_POSITION_ALIGNED:
|
| position = break_point_info->source_position();
|
| break;
|
| - default:
|
| - UNREACHABLE();
|
| - position = break_point_info->statement_position();
|
| }
|
|
|
| locations->set(count++, position);
|
|
|