diff options
Diffstat (limited to 'src/debug.cc')
-rw-r--r-- | src/debug.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/debug.cc b/src/debug.cc index 98e366c7..d513b312 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1028,8 +1028,8 @@ Handle<DebugInfo> Debug::GetDebugInfo(Handle<SharedFunctionInfo> shared) { void Debug::SetBreakPoint(Handle<SharedFunctionInfo> shared, - int source_position, - Handle<Object> break_point_object) { + Handle<Object> break_point_object, + int* source_position) { HandleScope scope; if (!EnsureDebugInfo(shared)) { @@ -1043,9 +1043,11 @@ void Debug::SetBreakPoint(Handle<SharedFunctionInfo> shared, // Find the break point and change it. BreakLocationIterator it(debug_info, SOURCE_BREAK_LOCATIONS); - it.FindBreakLocationFromPosition(source_position); + it.FindBreakLocationFromPosition(*source_position); it.SetBreakPoint(break_point_object); + *source_position = it.position(); + // At least one active break point now. ASSERT(debug_info->GetBreakPointCount() > 0); } |