Commit 6880a8dd authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Don't automatically remove breakpoints

Out of the four listed reasons, two are obsolete now, since stepping
does not modify the code table any more. The first reason also cannot
happen any more, since removing a breakpoint will also patch the stack
of the isolate, and even if not, removing a breakpoint which is not set
will have no effect (not even a stack rewriting). The same applies for
the last listed reason.

So overall, this code is not needed any more, since it has no effect.

R=thibaudm@chromium.org

Bug: v8:10611
Change-Id: I773ac2515b66e8bf66cb035c315db552024485c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2316299Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69041}
parent fa74cd18
...@@ -491,17 +491,6 @@ RUNTIME_FUNCTION(Runtime_WasmDebugBreak) { ...@@ -491,17 +491,6 @@ RUNTIME_FUNCTION(Runtime_WasmDebugBreak) {
// We hit one or several breakpoints. Notify the debug listeners. // We hit one or several breakpoints. Notify the debug listeners.
isolate->debug()->OnDebugBreak(breakpoints); isolate->debug()->OnDebugBreak(breakpoints);
} }
} else {
// Unused breakpoint. Possible scenarios:
// 1. We hit a breakpoint that was already removed,
// 2. We hit a stepping breakpoint after resuming,
// 3. We hit a stepping breakpoint during a stepOver on a recursive call.
// 4. The breakpoint was set in a different isolate.
// We can handle the first three cases by simply removing the breakpoint (if
// it exists), since this will also recompile the function without the
// stepping breakpoints.
// TODO(thibaudm/clemensb): handle case 4.
debug_info->RemoveBreakpoint(frame->function_index(), position, isolate);
} }
return ReadOnlyRoots(isolate).undefined_value(); return ReadOnlyRoots(isolate).undefined_value();
......
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