Skip to content

script: Fix GC borrow hazard in HTMLImageElement::abort_request - #47051

Merged
jdm merged 1 commit into
servo:mainfrom
treetmitterglad:abort_request-borrow-hazard
Aug 7, 2026
Merged

jdm merged 1 commit into
servo:mainfrom
treetmitterglad:abort_request-borrow-hazard

Conversation

@treetmitterglad

Copy link
Copy Markdown
Contributor

Rewrote GC handling in the abort_request function to prevent potential crashes due to conflicts with the GC during mutable borrows, and to perform immutable borrows when possible.

Testing: Ran ./mach test-wpt tests/wpt/tests/html/semantics/embedded-content/the-img-element/ , 135/135 passed
Fixes: #34107

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 6, 2026
Comment thread components/script/dom/html/htmlimageelement.rs Outdated
@treetmitterglad
treetmitterglad force-pushed the abort_request-borrow-hazard branch from 74950f6 to bdbd3c8 Compare August 6, 2026 20:33

@jdm jdm 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.

Thanks!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 6, 2026
@jdm
jdm enabled auto-merge August 6, 2026 21:04
@Narfinger
Narfinger force-pushed the abort_request-borrow-hazard branch from bdbd3c8 to 006b4d7 Compare August 7, 2026 07:38
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 7, 2026
@Narfinger

Copy link
Copy Markdown
Contributor

Rebased to restart CI.

@jdm
jdm added this pull request to the merge queue Aug 7, 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 Aug 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 7, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 7, 2026
@Narfinger
Narfinger added this pull request to the merge queue Aug 7, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 7, 2026
@servo-highfive servo-highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 7, 2026
Signed-off-by: Eli Bowman <asdfup@protonmail.com>
@treetmitterglad
treetmitterglad force-pushed the abort_request-borrow-hazard branch from 006b4d7 to 06f767e Compare August 7, 2026 19:31
@servo-highfive servo-highfive removed the S-needs-rebase There are merge conflict errors. label Aug 7, 2026
@jdm
jdm added this pull request to the merge queue Aug 7, 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 Aug 7, 2026
Merged via the queue into servo:main with commit ce73989 Aug 7, 2026
33 checks passed
@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 Aug 7, 2026
@treetmitterglad
treetmitterglad deleted the abort_request-borrow-hazard branch August 8, 2026 13:25
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…o#47051)

Rewrote GC handling in the `abort_request` function to prevent potential
crashes due to conflicts with the GC during mutable borrows, and to
perform immutable borrows when possible.

Testing: Ran `./mach test-wpt
tests/wpt/tests/html/semantics/embedded-content/the-img-element/ `,
135/135 passed
Fixes: servo#34107

Signed-off-by: Eli Bowman <asdfup@protonmail.com>
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.

HTMLImageElement::abort_request has a GC borrow hazard

4 participants