From 4b38ab571fbd25f8a06e6644bf995447584ec301 Mon Sep 17 00:00:00 2001 From: Andrzej Surdej Date: Fri, 20 Mar 2026 11:46:58 +0100 Subject: [PATCH] [EME] Fix logging inside requestMediaKeySystemAccess() flow 1) Fix logging for std::optional type 2) Log supportedConfiguration before WTFMove() --- Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp b/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp index 488227f39aafc..9117fa42823fd 100644 --- a/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp +++ b/Source/WebCore/Modules/encryptedmedia/NavigatorEME.cpp @@ -62,7 +62,7 @@ template struct LogArgument> { static String toString(const std::optional& value) { - return value ? "nullopt"_s : LogArgument::toString(value.value()); + return value ? LogArgument::toString(value.value()) : "nullopt"_s; } }; @@ -153,10 +153,10 @@ static void tryNextSupportedConfiguration(Document& document, RefPtr&& impl // Obtain reference to the key system string before the `implementation` RefPtr<> is cleared out. const String& keySystem = implementation->keySystem(); + infoLog(logger, identifier, "Resolved: keySystem(", keySystem, "), supportedConfiguration(", supportedConfiguration, ")"); auto access = MediaKeySystemAccess::create(document, keySystem, WTFMove(supportedConfiguration.value()), implementation.releaseNonNull()); // 6.3.3.2. Resolve promise with access and abort the parallel steps of this algorithm. - infoLog(logger, identifier, "Resolved: keySystem(", keySystem, "), supportedConfiguration(", supportedConfiguration, ")"); promise->resolveWithNewlyCreated>(WTFMove(access)); return; }