Commit 35a802ea authored by Kim-Anh Tran's avatar Kim-Anh Tran Committed by Commit Bot

[debug] Check if a breakpoint was already inserted

This check skips inserting a breakpoint into the BreakPointInfo if
it has already been inserted before.

Change-Id: Ic773fe1d6b2351bf6069fa0ff002737bd0b03293
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2253851Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68447}
parent edd381f7
......@@ -274,10 +274,13 @@ void BreakPointInfo::SetBreakPoint(Isolate* isolate,
break_point_info->set_break_points(*break_point);
return;
}
// If the break point object is the same as before just ignore.
if (break_point_info->break_points() == *break_point) return;
// If there was one break point object before replace with array.
if (!break_point_info->break_points().IsFixedArray()) {
if (IsEqual(BreakPoint::cast(break_point_info->break_points()),
*break_point)) {
return;
}
Handle<FixedArray> array = isolate->factory()->NewFixedArray(2);
array->set(0, break_point_info->break_points());
array->set(1, *break_point);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment