servo/components/devtools
Delan Azabani 30b712aaf9
devtools: Fix id collisions by using incrementing counters (#35971)
Devtools clients need a `browserId`, `browsingContextID`, and
`outerWindowID`, which correspond to WebViewId, BrowsingContextId, and
PipelineId in Servo. These u32 values were previously derived from our
sharded (u32,u32) id values by taking only the `index` (second u32) and
ignoring the `namespace_id` (first u32), leading to collisions.

This patch fixes that by mapping those Servo ids to sequential u32
values.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #35954

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
2025-04-01 09:00:40 +00:00
..
actors devtools: Fix id collisions by using incrementing counters (#35971) 2025-04-01 09:00:40 +00:00
actor.rs devtools: improve ID Naming for better readability and context (#35942) 2025-03-13 07:36:54 +00:00
build.rs Devtools device description: improve how Servo is advertised in Firefox's about:debugging (fixes #27528) (#32227) 2024-05-08 04:12:18 +00:00
Cargo.toml Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
id.rs devtools: Fix id collisions by using incrementing counters (#35971) 2025-04-01 09:00:40 +00:00
lib.rs devtools: Fix id collisions by using incrementing counters (#35971) 2025-04-01 09:00:40 +00:00
network_handler.rs devtools: refactor network related (#36093) 2025-03-22 14:46:57 +00:00
protocol.rs DevTools: Replace camel case variable names (#32726) 2024-07-08 11:18:35 +00:00