[wpt-sync] Sync PR 29068 - MSE-in-Workers: Make MediaSource.duration acquire lock to access demuxer
Categories
(Core :: Audio/Video: Playback, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox90 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 29068 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/29068
Details from upstream follow.
b'Matt Wolenetz <wolenetz@chromium.org>' wrote:
MSE-in-Workers: Make MediaSource.duration acquire lock to access demuxer
Worker JS accessing MediaSource.duration wasn't taking the necessary
CrossThreadAttachment lock. It should, so that it can safely access the
underlying main-thread-owned demuxer to retrieve its duration.This change refactors MediaSource::duration() so that only the IDL calls
it, and both it and all other previous callers of duration() are updated
to instead call GetDuration_Locked. duration() calls GetDuration_Locked
via the existing MediaSource::RunUnlessElementGoneOrClosingUs()
machinery that ensures the call only occurs while it is safe to access
the underlying demuxer. Other callers of MediaSource::duration() were
already running in the context of that machinery, and are updated to
provide the appropriate ExclusiveKey to confirm that contract statically
during build (like all the other paths already using that machinery).Bug: 1211551,878133
Change-Id: I44b97e63e2a2bd9473f4cd0fc07bc734b344bf2d
Reviewed-on: https://chromium-review.googlesource.com/2909389
WPT-Export-Revision: 67aa3041a30213ddefda3444ee700b5b87f6e287
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
CI Results
Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 1 subtests
Status Summary
Firefox
OK : 2
PASS: 1
FAIL: 2
Chrome
OK : 2
PASS: 6
Safari
OK : 2
PASS: 1
FAIL: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/media-source/dedicated-worker/mediasource-worker-objecturl.html
Test main context revocation of DedicatedWorker MediaSource object URL: FAIL (Chrome: PASS, Safari: FAIL)
/media-source/dedicated-worker/mediasource-worker-play.html
Test worker MediaSource construction, attachment, buffering and basic playback: FAIL (Chrome: PASS, Safari: FAIL)
Comment 6•4 years ago
|
||
| bugherder | ||
Description
•