Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8a95cf4e5163c3863381fcab2657c946cf1bed65
https://github.com/WebKit/WebKit/commit/8a95cf4e5163c3863381fcab2657c946cf1bed65
Author: Fujii Hironori <[email protected]>
Date: 2026-01-18 (Sun, 18 Jan 2026)
Changed paths:
M Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
M Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
Log Message:
-----------
Variant MediaControlsHost::MenuData should have std::monostate as the first
alternative for the empty value of HashTraits
https://bugs.webkit.org/show_bug.cgi?id=305710
Reviewed by Patrick Griffis.
For HashMap<Key, Value>, the type Value must have a special emtpy value.
However VariantHashTraits doesn't define constructEmptyValue. If the first
alternative of a Variant is Ref<T>, GenericHashTraits::constructEmptyValue is
used to constuct an empty value of Ref<T>. This causes a problem.
media/modern-media-controls/tracks-support/on-off-text-track.html was crashing
for non-Apple ports because MediaControlsHost::MenuData is a Variant which
first alternative is Ref<AudioTrack> for non-Apple ports. An assertion was
failed during constructEmptyValue.
The variant MediaControlsHost::MenuData should have std::monostate as the first
alternative for the empty value.
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::showMediaControlsContextMenu):
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.h:
Canonical link: https://commits.webkit.org/305783@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications