Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dae8f69439650642c9a2b65f2bb5cebd981265ad
https://github.com/WebKit/WebKit/commit/dae8f69439650642c9a2b65f2bb5cebd981265ad
Author: Jean-Yves Avenard <[email protected]>
Date: 2025-02-12 (Wed, 12 Feb 2025)
Changed paths:
A
LayoutTests/media/media-source/worker/media-managedmse-tracks-worker-expected.txt
A LayoutTests/media/media-source/worker/media-managedmse-tracks-worker.html
M LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt
M LayoutTests/media/media-source/worker/media-managedmse-worker.html
M LayoutTests/media/media-source/worker/worker.js
A
LayoutTests/platform/glib/media/media-source/worker/media-managedmse-tracks-worker-expected.txt
M LayoutTests/platform/mac-site-isolation/TestExpectations
A
LayoutTests/platform/mac-wk1/media/media-source/worker/media-managedmse-tracks-worker-expected.txt
M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp
M Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.h
M Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h
M Source/WebKit/WebProcess/GPU/media/VideoTrackPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/VideoTrackPrivateRemote.h
Log Message:
-----------
[MSE in Worker] ASSERTION FAILED: The atom string comes from an other thread!
https://bugs.webkit.org/show_bug.cgi?id=287389
rdar://144502119
Reviewed by Eric Carlson and Chris Dumez.
When a MediaSource is used in a DedicatedWorker, the
{Audio|Video|Text}TrackPrivateRemote (owned by the MediaPlayerPrivateRemote)
is shared with both the HTMLMediaElement's tracks on the main thread, and the
SourceBuffer's tracks in the DedicatedWorker.
When the {Audio|Video|Text}Track were constructed, we passed the language and
label strings
which constructed the AudioTrack's label and language AtomStrings from that
same string.
When the AtomString is constructed, it mutates the original String's
m_hashAndFlags to indicate
that the string is now part of the AtomString table.
As we then attempted to create another AtomString with that same original
String on another thread,
we would get the assertion.
Additionally, we could have used the TrackPrivateRemote's language and label
Strings on multiple threads without
a call to String.isolatedCopy() in between which isn't allowed (Strings are
only ever copied
via a shallow copy).
We now only return an isolated string whenever the TrackPrivateRemote getters
are called.
We also extend the same mechanism to InbandTextTrackPrivate's
inBandMetadataTrackDispatchType string.
Fly-by: Have MediaSourcePrivate::currentTime() return zeroTime() instead of
invalidTime() when detached (this got missed in 284322@main)
Added tests checking that we can correctly append new init and media segments
that contains language information
to a SourceBuffer constructed on a DedicatedWorker.
*
LayoutTests/platform/glib/media/media-source/worker/media-managedmse-tracks-worker-expected.txt:
Added.
*
LayoutTests/media/media-source/worker/media-managedmse-tracks-worker-expected.txt:
Added.
* LayoutTests/media/media-source/worker/media-managedmse-tracks-worker.html:
Copied from LayoutTests/media/media-source/worker/media-managedmse-worker.html.
* LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt:
* LayoutTests/media/media-source/worker/media-managedmse-worker.html:
* LayoutTests/media/media-source/worker/worker.js:
(waitForEvent):
(onmessage.async msg):
(logToMain): Deleted.
(onmessage): Deleted.
* LayoutTests/platform/mac-site-isolation/TestExpectations:
*
LayoutTests/platform/mac-wk1/media/media-source/worker/media-managedmse-tracks-worker-expected.txt:
Added.
* Source/WebCore/platform/graphics/MediaSourcePrivate.cpp:
(WebCore::MediaSourcePrivate::currentTime const):
* Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:
(WebKit::AudioTrackPrivateRemote::updateConfiguration):
* Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.cpp:
(WebKit::TextTrackPrivateRemote::updateConfiguration):
* Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/VideoTrackPrivateRemote.cpp:
(WebKit::VideoTrackPrivateRemote::updateConfiguration):
* Source/WebKit/WebProcess/GPU/media/VideoTrackPrivateRemote.h:
Canonical link: https://commits.webkit.org/290263@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes