Skip to content

script: Address borrow hazard in DocumentEventHandler::handle_touch_event - #46693

Merged
jdm merged 3 commits into
servo:mainfrom
jdm:document-event-handler-hazard
Jul 21, 2026
Merged

jdm merged 3 commits into
servo:mainfrom
jdm:document-event-handler-hazard

Conversation

@jdm

@jdm jdm commented Jul 21, 2026

Copy link
Copy Markdown
Member

Replacing uses of borrow_mut with safe_borrow_mut in DocumentEventHandler exposed a borrow hazard. This is addressed by scoping the mutable borrow to the code that requires mutation.

Testing: Existing tests suffice.
Fixes: part of #40600

@jdm
jdm requested a review from gterzian as a code owner July 21, 2026 15:33
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 21, 2026

@mrobinson mrobinson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's like we are living the future. :)

Comment thread components/script/dom/document/document_event_handler.rs
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jul 21, 2026
jdm added 2 commits July 21, 2026 12:15
Signed-off-by: Josh Matthews <[email protected]>
@jdm
jdm force-pushed the document-event-handler-hazard branch from cea130c to 54e99a0 Compare July 21, 2026 16:15
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 21, 2026
@jdm
jdm enabled auto-merge July 21, 2026 16:15
@jdm
jdm added this pull request to the merge queue Jul 21, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 21, 2026
Merged via the queue into servo:main with commit ce2b124 Jul 21, 2026
34 checks passed
@jdm
jdm deleted the document-event-handler-hazard branch July 21, 2026 17:15
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants