Skip to content

script: Use create_a_potential_cors_request_with_claim in htmlmediaelement.rs - #64121

Merged
servo-wpt-sync merged 1 commit into
web-platform-tests:masterfrom
servo:servo_export_49206
Oct 30, 2026
Merged

servo-wpt-sync merged 1 commit into
web-platform-tests:masterfrom
servo:servo_export_49206

Conversation

@servo-wpt-sync

@servo-wpt-sync servo-wpt-sync commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Use ensure_blob_referenced_by_url_is_kept_alive to get a UrlWithBlobClaim for the media element's resource URL in fetch_request, then pass it to create_a_potential_cors_request_with_claim instead of the temporary create_a_potential_cors_request.

Testing: Added tests/wpt/tests/html/semantics/embedded-content/media-elements/loading-the-media-resource/media-blob-url-revoked.window.js. It loads an <audio> from a blob URL and has three subtests: the URL is never revoked, it is revoked in a microtask after the fetch has started (both should load), and it is revoked before src is set (should fire error with MEDIA_ERR_SRC_NOT_SUPPORTED). All three pass with the fix. They also passed without it in 15 of 15 local runs, because the request reaches the net thread before the revoke does, so this test is regression coverage rather than proof of the fix. ./mach test-tidy is clean. Try run: https://github.com/rogerkorantenng/servo/actions/runs/39981862598

Note: seeks and resumed downloads call fetch_request again and take a new claim, so if the page revokes the URL after the first load, those refetches will still fail. Happy to handle that in a follow-up if wanted.

Fixes: Part of #48892
Reviewed in servo/servo#49206

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

Copy link
Copy Markdown
Collaborator

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.

@servo-wpt-sync
servo-wpt-sync merged commit dee08ed into web-platform-tests:master Oct 30, 2026
31 checks passed
@servo-wpt-sync
servo-wpt-sync deleted the servo_export_49206 branch October 30, 2026 15:03
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.

4 participants