Skip to content

script: Fix assertion failure when track with no cues is rendered - #48827

Merged
mrobinson merged 2 commits into
servo:mainfrom
TimvdLippe:fix-text-track-crash
Oct 12, 2026
Merged

mrobinson merged 2 commits into
servo:mainfrom
TimvdLippe:fix-text-track-crash

Conversation

@TimvdLippe

@TimvdLippe TimvdLippe commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

A text track without any cues therefore also hasn't set any rules for rendering. The debug assert is quite elaborate now, but I think these are all the valid scenarios.

Fixes #48812
Testing: This change adds a new crash test.

A text track without any cues therefore also hasn't set any rules for
rendering. The debug assert is quite elaborate now, but I think these
are all the valid scenarios.

Fixes servo#48812

Testing: adds a new crash test

Signed-off-by: Tim van der Lippe <[email protected]>
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#63562) with upstreamable changes.

<div id="div">
<video id="video" controls="">
<script>
// Add a video track.

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.

I know I wrote this test, but this should probably say "add text track" or maybe just remove the comments entirely as they were mainly to help debugging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not at my computer and won't be able to update the manifest. I am fine with keeping the line. If you want it gone, can you fix it and push to this branch?

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 12, 2026
@mrobinson mrobinson changed the title script: Fix crash when track with no cues is rendered script: Fix assertion failure when track with no cues is rendered Oct 12, 2026
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#63562) title and body.

1 similar comment
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#63562) title and body.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 12, 2026
Co-authored-by: Martin Robinson <[email protected]>
Signed-off-by: Martin Robinson <[email protected]>
@mrobinson
mrobinson force-pushed the fix-text-track-crash branch from 9241165 to e59a90f Compare October 12, 2026 08:39
@mrobinson
mrobinson enabled auto-merge October 12, 2026 08:40
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#63562).

1 similar comment
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#63562).

@mrobinson
mrobinson added this pull request to the merge queue Oct 12, 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 Oct 12, 2026
Merged via the queue into servo:main with commit c240b77 Oct 12, 2026
35 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 Oct 12, 2026
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

⛔ Failed to properly merge the upstream pull request (web-platform-tests/wpt#63562). Please address any CI issues and try to merge manually.

philocalyst added a commit to philocalyst/servo that referenced this pull request Oct 13, 2026
* upstream/main: (1116 commits)
  base: Use serde_json::from_reader instead of allocating a string (servo#48843)
  script_bindings/script: Unify valid_floating_point_number_string (servo#48844)
  script: Update radio group when checked radio button joins by changing form owner (servo#48069)
  Font: avoid copying memory mapped font data on macOS (servo#48841)
  script: Small clean-up in `HTMLScriptElement`'s `get_script_type` (servo#48831)
  script: set checked element state when cloning input element (servo#48845)
  layout: Treat preserved tabs as conditionally hanging under `white-space: pre-wrap` (servo#48753)
  pixels: avoid snapshot copies in single-process mode (servo#48836)
  url: Faster url to string conversion (servo#48838)
  layout: Split `accessibility/mod.rs` into separate files (servo#48830)
  devtools: feature guard (servo#47255)
  script: Fix assertion failure when track with no cues is rendered (servo#48827)
  deny: Allow unused-allowed-org (servo#46281)
  a11y: Add more helper functions in integration test. (servo#48777)
  net: Avoid cloning the whole CorsCache when cleaning (servo#48828)
  layout: Replace `Direction` with `LogicalAxis` (servo#48815)
  Bump to Stylo with legacy justify-align fix (servo#48806)
  build: bump ohos-abilitykit-sys from 0.1.6 to 0.1.7 (servo#48822)
  build: bump thin-vec from 0.2.20 to 0.2.21 (servo#48821)
  build: bump hyper from 1.11.1 to 1.12.0 (servo#48820)
  ...

# Conflicts:
#	components/config/prefs.rs
#	components/layout/display_list/mod.rs
#	components/layout/flow/inline/mod.rs
#	components/layout/flow/inline/text_run.rs
#	components/layout/layout_impl.rs
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.

assertion failed: !is_showing || ... (thread Script#1, at components/script/dom/webvtt/rules_for_rendering.rs:72)

4 participants