v8/test/inspector/debugger/instrumentation-multiple-sessions-expected.txt
Jaroslav Sevcik 4c3266841c [inspector] Handle instrumentation break with multiple sessions
Currently, any session can resume instrumentation breaks by sending
Debugger.resume command. That can lead to unreliable breakpoint
placement because sessions can resume too early.

The early resumption can happen in two ways:

- When we have two instrumented sessions, the first one to resume
  can prevent the other one from setting its breakpoints
  before executing the code.

- With one instrumented session and one without instrumentation
  breakpoints, the uninstrumented session's Debugger.resume
  command can resume the instrumentation pause before the
  instrumented session can set its breakpoints.

This patch fixes both of these issues by changing the instrumentation
pause resumption logic to take note of the sessions that were notified
about the instrumentation breakpoints. The debugger will only resume
once all those sessions resume (or disconnect).

Bug: chromium:1354043
Change-Id: I84cf16b57187dbb40645b2f7ec2e08f0078539dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100466
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84827}
2022-12-14 06:01:22 +00:00

65 lines
1.6 KiB
Plaintext

Checks instrumentation pause with multiple sessions
Running test: testTwoInstrumentationBreaksResume
Created two sessions.
Paused 1: instrumentation
Paused 2: instrumentation
Resumed session 1
Resumed session 2
Evaluation result: 42
Evaluation finished
Running test: testInstrumentedSessionNotification
Created two sessions.
Session 1 paused (instrumentation)
Session 2 paused (other)
Resumed session 1
Resumed session 2
Evaluation result: 42
Evaluation finished
Running test: testNonInstrumentedSessionCannotsResumeInstrumentationPause
Created two sessions.
Session 1 paused (instrumentation)
Session 2 paused (other)
Called "resume" on session 2
Called "resume" on session 1
Resumed session 1
Resumed session 2
Evaluation result: 42
Evaluation finished
Running test: testEvaluationFromNonInstrumentedSession
Created two sessions.
Session 1 paused (instrumentation)
Session 2 paused (other)
Called "resume" on session 1
Resumed session 1
Resumed session 2
Evaluation result: 42
Evaluation finished
Running test: testTransparentEvaluationFromNonInstrumentedSessionDuringPause
Created two sessions.
Session 1 paused (instrumentation)
Session 2 paused (other)
Resumed session 1
Session 2 evaluation result: 42
Running test: testInstrumentationStopResumesWithOtherSessions
Created two sessions.
Session 1 paused (instrumentation)
Stopped session 1
Resumed session 2
Session 2 evaluation result: 42
Running test: testInstrumentationPauseAndNormalPause
Created two sessions.
Session 1 paused (instrumentation)
Session 2 paused (other)
Session 2 pause requested
Session 1 instrumentation resume requested
Session 2 paused (other)
Session 2 resumed
Session 1 evaluation result: 42