Skip to content

Commit dda6995

Browse files
creliercommit-bot@chromium.org
authored andcommitted
[vm/bytecode] Debugger should not signal breakpoint resolution twice.
If the debugger has already signaled the resolution of a breakpoint in a bytecode function, it should not signal its resolution in code again. This fixes test service/breakpoint_async_break_test Change-Id: I88743b65eb3049a1a9476cb67f17ebf4275f8455 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114923 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Régis Crelier <[email protected]>
1 parent ea09fbe commit dda6995

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

runtime/vm/debugger.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4748,6 +4748,8 @@ void Debugger::HandleCodeChange(bool bytecode_loaded, const Function& func) {
47484748
// There is no local function within func that contains the
47494749
// breakpoint token position. Resolve the breakpoint if necessary
47504750
// and set the code breakpoints.
4751+
const bool resolved_in_bytecode =
4752+
!bytecode_loaded && loc->IsResolved(/* in_bytecode = */ true);
47514753
if (!loc->IsResolved(bytecode_loaded)) {
47524754
// Resolve source breakpoint in the newly compiled function.
47534755
TokenPosition bp_pos = ResolveBreakpointPos(
@@ -4774,7 +4776,11 @@ void Debugger::HandleCodeChange(bool bytecode_loaded, const Function& func) {
47744776
func.ToFullyQualifiedCString(), requested_pos.ToCString(),
47754777
requested_end_pos.ToCString(), loc->requested_column_number());
47764778
}
4777-
SendBreakpointEvent(ServiceEvent::kBreakpointResolved, bpt);
4779+
// Do not signal resolution in code if already signaled resolution
4780+
// in bytecode.
4781+
if (!resolved_in_bytecode) {
4782+
SendBreakpointEvent(ServiceEvent::kBreakpointResolved, bpt);
4783+
}
47784784
bpt = bpt->next();
47794785
}
47804786
}

0 commit comments

Comments
 (0)