devtools: Avoid creating unnecessary new frame actors (#42906)

Before we were creating a new frame actor each time we paused, even if
the frame object in debugger.js was the same. Now we avoid this by
reusing the same frame actor id.

This helps our upcoming work on onStep, onPop, and onEnterFrame hooks.

Testing: Ran `mach test-devtools` and manually check that it works
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-27 15:34:18 +01:00
committed by GitHub
parent dfe7117084
commit b2b27d857b
6 changed files with 75 additions and 46 deletions

View File

@@ -10,7 +10,7 @@ interface DebuggerInterruptEvent : Event {};
partial interface DebuggerGlobalScope {
undefined pauseAndRespond(
PipelineIdInit pipelineId,
DOMString frameActorId,
FrameOffset frameOffset,
PauseReason pauseReason);
DOMString? registerFrameActor(
@@ -24,12 +24,16 @@ dictionary PauseReason {
};
dictionary FrameInfo {
required unsigned long column;
required DOMString displayName;
required unsigned long line;
required boolean onStack;
required boolean oldest;
required boolean terminated;
required DOMString type_;
required DOMString url;
};
dictionary FrameOffset {
required DOMString frameActorId;
required unsigned long column;
required unsigned long line;
};