servo/resources
shuppy f5b631e270
devtools: Show clients where they can set breakpoints (#37667)
devtools clients query source actors to determine where the user can set
breakpoints in a source. there are two relevant requests here:
`getBreakableLines` controls which line numbers can be clicked in the
margin, and once a line number is clicked,
`getBreakpointPositionsCompressed` controls where to show breakpoint
buttons within that line.

this patch handles those requests by querying the [SpiderMonkey Debugger
API](https://firefox-source-docs.mozilla.org/js/Debugger/) for that
information:
- devtools sends its script thread a GetPossibleBreakpoints message for
the source’s
[`spidermonkey_id`](https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.Source.html#id)
- the script thread fires a `getPossibleBreakpoints` event into its
debugger global
- the debugger script looks up the
[root](https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.html#onnewscript-script-global)
[Debugger.Script](https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.Script.html#getpossiblebreakpoints-query)
for that source, calls
[getPossibleBreakpoints()](https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.Script.html#getpossiblebreakpoints-query),
and returns the result via
DebuggerGlobalScope#getPossibleBreakpointsResult()
- that method takes the pending result sender, and sends the result back
to devtools
- devtools massages the result into the format required by the request,
and replies to the client

as a result, users of the Firefox devtools client can now set
breakpoints, though they don’t have any effect.

Testing: this patch adds new devtools tests
Fixes: part of #36027

<img width="1433" height="1328" alt="image"
src="https://github.com/user-attachments/assets/f0cd31e0-742f-44d3-8c5d-ceedd9a2706d"
/>

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
2025-08-12 04:53:53 +00:00
..
resource_protocol Remove unused resources (#38245) 2025-07-24 00:34:15 +00:00
user-agent-js dom: Hide debugging extension methods behind a pref. 2020-07-14 22:39:59 -04:00
about-memory.html Make the memory reporting multi-process aware (#35863) 2025-04-05 05:42:12 +00:00
android_params Update test expectations, remove webrender prefs/cmd line. 2016-09-28 18:42:30 +10:00
badcert.html Switch to rustls and webpki-roots (#30025) 2023-08-08 14:00:10 +00:00
cert-google-only Add xpcshell script and warning 2015-01-31 15:40:54 +05:30
cert-wpt-only Add Web Platform Tests root CA 2018-09-07 10:57:55 +02:00
crash.html constellation: crash to a new “sad tab” error page (#30290) 2023-09-06 09:52:37 +00:00
Credits.rtf.mako Add servo version to mac about servo window. 2016-08-19 18:55:27 -05:00
debugger.js devtools: Show clients where they can set breakpoints (#37667) 2025-08-12 04:53:53 +00:00
directory-listing.html Fix missing space in title of directory listings (#35837) 2025-03-07 12:52:09 +00:00
gatt_blocklist.txt Fix invalid descriptor uuid 2016-12-07 00:03:59 +01:00
hsts_preload.fstmap Replace hsts preload list hashmap with an FST (#37015) 2025-05-20 04:26:55 +00:00
iso-8859-8.css Treat the keygen element as obsolete (#30429) 2023-09-26 21:37:46 +00:00
neterror.html Improve page load error information 2016-07-21 16:06:13 +02:00
org.servo.Servo.desktop Add Linux .desktop file (#38038) 2025-07-13 23:07:12 +00:00
package-prefs.json Remove UWP / Hololens support 2023-07-05 09:12:09 +02:00
privatekey_for_testing.key tests/net: Update testing cert. 2017-12-24 15:47:16 +01:00
public_domains.txt Update public_domains.txt 2020-02-12 01:40:06 +01:00
rippy.png Optimize PNG images in resources folder (#38229) 2025-07-23 18:43:09 +00:00
self_signed_certificate_for_testing.crt tests/net: Update testing cert. 2017-12-24 15:47:16 +01:00
servo.icns Update servo.icns icon 2020-11-17 19:36:54 -08:00
servo.ico Update Servo logo files 2020-06-29 23:20:54 -07:00
servo.svg New Servo logo(s) 2020-02-12 16:30:00 -05:00
servo_64.png Optimize PNG images in resources folder (#38229) 2025-07-23 18:43:09 +00:00
servo_1024.png Optimize PNG images in resources folder (#38229) 2025-07-23 18:43:09 +00:00
wpt-prefs.json script: Implement DocumentOrShadowDOM.adoptedStylesheet with FrozenArray (#38163) 2025-07-23 08:16:01 +00:00