| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index bbf2d5568dbf649d8f14d53ab4ed4552189ecbd3..32d1e8f1131903f7dd8062c704d211223e7536bd 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -1315,36 +1315,32 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
|
| namespace {
|
| template <typename Iterator>
|
| void GetBreakablePositions(Iterator* it, int start_position, int end_position,
|
| - BreakPositionAlignment alignment,
|
| - std::set<int>* positions) {
|
| - it->SkipToPosition(start_position, alignment);
|
| + std::vector<BreakLocation>* locations) {
|
| + it->SkipToPosition(start_position, BREAK_POSITION_ALIGNED);
|
| while (!it->Done() && it->position() < end_position &&
|
| it->position() >= start_position) {
|
| - positions->insert(alignment == STATEMENT_ALIGNED ? it->statement_position()
|
| - : it->position());
|
| + locations->push_back(it->GetBreakLocation());
|
| it->Next();
|
| }
|
| }
|
|
|
| void FindBreakablePositions(Handle<DebugInfo> debug_info, int start_position,
|
| - int end_position, BreakPositionAlignment alignment,
|
| - std::set<int>* positions) {
|
| + int end_position,
|
| + std::vector<BreakLocation>* locations) {
|
| if (debug_info->HasDebugCode()) {
|
| CodeBreakIterator it(debug_info);
|
| - GetBreakablePositions(&it, start_position, end_position, alignment,
|
| - positions);
|
| + GetBreakablePositions(&it, start_position, end_position, locations);
|
| } else {
|
| DCHECK(debug_info->HasDebugBytecodeArray());
|
| BytecodeArrayBreakIterator it(debug_info);
|
| - GetBreakablePositions(&it, start_position, end_position, alignment,
|
| - positions);
|
| + GetBreakablePositions(&it, start_position, end_position, locations);
|
| }
|
| }
|
| } // namespace
|
|
|
| bool Debug::GetPossibleBreakpoints(Handle<Script> script, int start_position,
|
| int end_position, bool restrict_to_function,
|
| - std::set<int>* positions) {
|
| + std::vector<BreakLocation>* locations) {
|
| if (restrict_to_function) {
|
| Handle<Object> result =
|
| FindSharedFunctionInfoInScript(script, start_position);
|
| @@ -1356,8 +1352,7 @@ bool Debug::GetPossibleBreakpoints(Handle<Script> script, int start_position,
|
| if (!EnsureDebugInfo(shared)) return false;
|
|
|
| Handle<DebugInfo> debug_info(shared->GetDebugInfo());
|
| - FindBreakablePositions(debug_info, start_position, end_position,
|
| - BREAK_POSITION_ALIGNED, positions);
|
| + FindBreakablePositions(debug_info, start_position, end_position, locations);
|
| return true;
|
| }
|
|
|
| @@ -1395,7 +1390,7 @@ bool Debug::GetPossibleBreakpoints(Handle<Script> script, int start_position,
|
| CHECK(candidates[i]->HasDebugInfo());
|
| Handle<DebugInfo> debug_info(candidates[i]->GetDebugInfo());
|
| FindBreakablePositions(debug_info, start_position, end_position,
|
| - BREAK_POSITION_ALIGNED, positions);
|
| + locations);
|
| }
|
| return true;
|
| }
|
|
|