Title: [224121] trunk/Source/WebCore
Revision
224121
Author
[email protected]
Date
2017-10-27 11:38:43 -0700 (Fri, 27 Oct 2017)

Log Message

NowPlayingInfo should contain a unique identifier
https://bugs.webkit.org/show_bug.cgi?id=178872
<rdar://problem/34924012>

Unreviewed, build fix.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Call string.impl().hash() instead of
string.existingHash() because the later will assert in a debug build if the hash hasn't
been calculated yet.
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (224120 => 224121)


--- trunk/Source/WebCore/ChangeLog	2017-10-27 17:48:15 UTC (rev 224120)
+++ trunk/Source/WebCore/ChangeLog	2017-10-27 18:38:43 UTC (rev 224121)
@@ -1,3 +1,18 @@
+2017-10-27  Eric Carlson  <[email protected]>
+
+        NowPlayingInfo should contain a unique identifier
+        https://bugs.webkit.org/show_bug.cgi?id=178872
+        <rdar://problem/34924012>
+
+        Unreviewed, build fix.
+
+        * platform/audio/ios/MediaSessionManagerIOS.mm:
+        (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Call string.impl().hash() instead of
+        string.existingHash() because the later will assert in a debug build if the hash hasn't
+        been calculated yet.
+        * platform/audio/mac/MediaSessionManagerMac.mm:
+        (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Ditto.
+
 2017-10-27  Alex Christensen  <[email protected]>
 
         Fix accessibility/mac/aria-label-on-label-element.html after r224074

Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (224120 => 224121)


--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2017-10-27 17:48:15 UTC (rev 224120)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2017-10-27 18:38:43 UTC (rev 224121)
@@ -271,7 +271,7 @@
     if (std::isfinite(duration) && duration != MediaPlayer::invalidTime())
         info.get()[MPMediaItemPropertyPlaybackDuration] = @(duration);
     info.get()[MPNowPlayingInfoPropertyPlaybackRate] = @(rate);
-    info.get()[kMRMediaRemoteNowPlayingInfoUniqueIdentifier] = @(title.existingHash());
+    info.get()[kMRMediaRemoteNowPlayingInfoUniqueIdentifier] = @(title.impl() ? title.impl()->hash() : 0);
 
     if (std::isfinite(currentTime) && currentTime != MediaPlayer::invalidTime())
         info.get()[MPNowPlayingInfoPropertyElapsedPlaybackTime] = @(currentTime);

Modified: trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm (224120 => 224121)


--- trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm	2017-10-27 17:48:15 UTC (rev 224120)
+++ trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm	2017-10-27 18:38:43 UTC (rev 224121)
@@ -178,7 +178,7 @@
     auto cfRate = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &rate));
     CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoPlaybackRate, cfRate.get());
 
-    m_lastUpdatedNowPlayingInfoUniqueIdentifier = title.existingHash();
+    m_lastUpdatedNowPlayingInfoUniqueIdentifier = title.impl() ? title.impl()->hash() : 0;
     auto cfIdentifier = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberLongLongType, &m_lastUpdatedNowPlayingInfoUniqueIdentifier));
     CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoUniqueIdentifier, cfIdentifier.get());
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to