Skip to content

script: Don't crash when encountering unexpected node types in Range::createContextualFragment#56149

Merged
servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom
servo:servo_export_40762
Nov 20, 2025
Merged

script: Don't crash when encountering unexpected node types in Range::createContextualFragment#56149
servo-wpt-sync merged 2 commits intoweb-platform-tests:masterfrom
servo:servo_export_40762

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

The spec says that all node types other than element, text and comment should be treated as None. We were panicking on a few instead.

Testing: This change adds a simple crashtest
Fixes: servo/servo#40719

Reviewed in servo/servo#40762

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Servo project.

Signed-off-by: Simon Wülker <[email protected]>
Signed-off-by: Simon Wülker <[email protected]>
@servo-wpt-sync servo-wpt-sync merged commit 0a8d6f0 into web-platform-tests:master Nov 20, 2025
19 checks passed
@servo-wpt-sync servo-wpt-sync deleted the servo_export_40762 branch November 20, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: internal error: entered unreachable code (at components/script/dom/range.rs:1142)

3 participants