[webkit-changes] [WebKit/WebKit] b7d8be: NEW TEST(276140 at main): [ MacOS WK1 Debug ] media/m...

Jean-Yves Avenard noreply at github.com
Fri Mar 22 02:56:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b7d8be7a8274318250bdbb161a6eee6daab33991
      https://github.com/WebKit/WebKit/commit/b7d8be7a8274318250bdbb161a6eee6daab33991
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2024-03-22 (Fri, 22 Mar 2024)

  Changed paths:
    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
    M LayoutTests/platform/mac-wk1/TestExpectations
    A LayoutTests/platform/mac-wk1/media/media-source/worker/media-managedmse-worker-expected.txt
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/Modules/mediasource/MediaSource.cpp
    M Source/WebCore/platform/MediaStrategy.cpp
    M Source/WebCore/platform/MediaStrategy.h
    M Source/WebCore/platform/PlatformStrategies.h
    M Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp
    M Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.h

  Log Message:
  -----------
  NEW TEST(276140 at main): [ MacOS WK1 Debug ] media/media-source/worker/media-managedmse-worker.html  is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=271323
rdar://125100787

Reviewed by Youenn Fablet.

WebPreferences are always set when running LayoutTests. MediaSource in a Worker is not functional
unless the GPU process is active and the MediaPlayers are to run in the GPU process.
MediaSource in a Worker can only work with a MediaSourcePrivate that is designed to be thread-safe
and at present there's only one kind: MediaSourcePrivateRemote.
As it is possible for a WebPreference to be turned on, we need to handle the case where it has
been accidentally set on a non-supported platform.
To achieve this we add a new MediaStrategy API: `hasThreadSafeSupport()` which will be checked
in addition to the `mediaSourceInWorkerEnabled` preference.

Updated existing test to ensure that enabling the pref on a non-supported configuration is
behaving properly.

* 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:
(onmessage):
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk1/media/media-source/worker/media-managedmse-worker-expected.txt: Added.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::enabledForContext):
(WebCore::MediaSource::canConstructInDedicatedWorker):
* Source/WebCore/platform/MediaStrategy.cpp:
(WebCore::MediaStrategy::hasThreadSafeMediaSourceSupport const):
* Source/WebCore/platform/MediaStrategy.h:
* Source/WebCore/platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::mediaStrategy): Allow creation of the MediaStrategy object on any threads, in practice this MediaStrategy creation is only
ever done on the main thread, but this could be different in the future.
* Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp:
(WebKit::WebMediaStrategy::createAudioDestination):
(WebKit::WebMediaStrategy::createNowPlayingManager const):
(WebKit::WebMediaStrategy::hasThreadSafeMediaSourceSupport const):
(WebKit::WebMediaStrategy::enableMockMediaSource):
* Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.h:

Canonical link: https://commits.webkit.org/276534@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list