devtools: Register frame actor before pause (#42844)

We need a map between frame actor ids (from devtools) and frame objects
(from debugger.js) to implement stepping hooks in the future.

To achieve this, we register the frame actor with a call to the devtools
before entering the event loop when the debugger is paused. Instead of
creating the frame actor in `handle_debugger_pause`, we create it
before.

Testing: It passes existing devtools tests
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
eri
2026-02-26 10:24:04 +01:00
committed by GitHub
parent ca3ff7046c
commit a2f1c55676
6 changed files with 109 additions and 46 deletions

View File

@@ -10,11 +10,15 @@ interface DebuggerInterruptEvent : Event {};
partial interface DebuggerGlobalScope {
undefined pauseAndRespond(
PipelineIdInit pipelineId,
PausedFrame result,
boolean is_breakpoint);
DOMString frameActorId,
boolean isBreakpoint);
DOMString? registerFrameActor(
PipelineIdInit pipelineId,
FrameInfo result);
};
dictionary PausedFrame {
dictionary FrameInfo {
required unsigned long column;
required DOMString displayName;
required unsigned long line;