devtools: Handle the setBreakpoint message. (#41925)

Listen for `setBreakpoint` on `debugger.js` and add the relevant WebIDLs
and Servo counterparts to trigger this event and notify SpiderMonkey.

Implement `find_source` for `SourceManager` and `find_offset` for
`SourceActor`.

Testing: Manual testing and `./mach test-devtools` (note, the latter
seems to have some failing tests, we are investigating this, but this
patch doesn't add any new failure).
Fixes: Part of #36027

---------

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
eri
2026-01-16 11:17:55 +01:00
committed by GitHub
parent f8cca188fe
commit 9d35414386
11 changed files with 287 additions and 25 deletions

View File

@@ -2162,6 +2162,14 @@ impl ScriptThread {
result_sender,
);
},
DevtoolScriptControlMsg::SetBreakpoint(spidermonkey_id, script_id, offset) => {
self.debugger_global.fire_set_breakpoint(
CanGc::from_cx(cx),
spidermonkey_id,
script_id,
offset,
);
},
}
}