Title: [206557] branches/safari-602-branch/Source/WebCore

Diff

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (206556 => 206557)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-09-28 22:13:31 UTC (rev 206556)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-09-28 22:32:02 UTC (rev 206557)
@@ -1,5 +1,25 @@
 2016-09-28  Babak Shafiei  <[email protected]>
 
+        Merge r206551. rdar://problem/28526639
+
+    2016-09-28  Wenson Hsieh  <[email protected]>
+
+            Some media tests are crashing due to soft-linking failures
+            https://bugs.webkit.org/show_bug.cgi?id=162698
+
+            Reviewed by Jer Noble.
+
+            We should be handling soft-linking failures for MRMediaRemoteSetNowPlayingVisibility gracefully. Guards these
+            calls with canLoad_MediaRemote_MRMediaRemoteSetParentApplication and also use the
+            SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER macro when soft linking.
+
+            * platform/audio/mac/MediaSessionManagerMac.mm:
+            (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
+            * platform/mac/MediaRemoteSoftLink.cpp:
+            * platform/mac/MediaRemoteSoftLink.h:
+
+2016-09-28  Babak Shafiei  <[email protected]>
+
         Merge r206527. rdar://problem/28499358
 
     2016-09-27  Wenson Hsieh  <[email protected]>

Modified: branches/safari-602-branch/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm (206556 => 206557)


--- branches/safari-602-branch/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm	2016-09-28 22:13:31 UTC (rev 206556)
+++ branches/safari-602-branch/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm	2016-09-28 22:32:02 UTC (rev 206557)
@@ -130,7 +130,9 @@
 
     if (!currentSession) {
         if (m_nowPlayingActive) {
-            MRMediaRemoteSetNowPlayingVisibility(MRMediaRemoteGetLocalOrigin(), MRNowPlayingClientVisibilityNeverVisible);
+            if (canLoad_MediaRemote_MRMediaRemoteSetNowPlayingVisibility())
+                MRMediaRemoteSetNowPlayingVisibility(MRMediaRemoteGetLocalOrigin(), MRNowPlayingClientVisibilityNeverVisible);
+
             LOG(Media, "MediaSessionManagerMac::updateNowPlayingInfo - clearing now playing info");
             MRMediaRemoteSetNowPlayingInfo(nullptr);
             m_nowPlayingActive = false;
@@ -151,7 +153,8 @@
         MRMediaRemoteSetCanBeNowPlayingApplication(true);
     });
 
-    MRMediaRemoteSetNowPlayingVisibility(MRMediaRemoteGetLocalOrigin(), MRNowPlayingClientVisibilityAlwaysVisible);
+    if (canLoad_MediaRemote_MRMediaRemoteSetNowPlayingVisibility())
+        MRMediaRemoteSetNowPlayingVisibility(MRMediaRemoteGetLocalOrigin(), MRNowPlayingClientVisibilityAlwaysVisible);
 
     String title = currentSession->title();
     double duration = currentSession->duration();

Modified: branches/safari-602-branch/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp (206556 => 206557)


--- branches/safari-602-branch/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp	2016-09-28 22:13:31 UTC (rev 206556)
+++ branches/safari-602-branch/Source/WebCore/platform/mac/MediaRemoteSoftLink.cpp	2016-09-28 22:32:02 UTC (rev 206557)
@@ -35,7 +35,7 @@
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteAddAsyncCommandHandlerBlock, void*, (MRMediaRemoteAsyncCommandHandlerBlock block), (block))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteRemoveCommandHandlerBlock, void, (void* observer), (observer))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteSetSupportedCommands, void, (CFArrayRef commands, MROriginRef origin, dispatch_queue_t replyQ, void(^completion)(MRMediaRemoteError err)), (commands, origin, replyQ, completion))
-SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteSetNowPlayingVisibility, void, (MROriginRef origin, MRNowPlayingClientVisibility visibility), (origin, visibility))
+SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteSetNowPlayingVisibility, void, (MROriginRef origin, MRNowPlayingClientVisibility visibility), (origin, visibility))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteCommandInfoCreate, MRMediaRemoteCommandInfoRef, (CFAllocatorRef allocator), (allocator));
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteCommandInfoSetCommand, void, (MRMediaRemoteCommandInfoRef commandInfo, MRMediaRemoteCommand command), (commandInfo, command))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, MediaRemote, MRMediaRemoteCommandInfoSetEnabled, void, (MRMediaRemoteCommandInfoRef commandInfo, Boolean enabled), (commandInfo, enabled))

Modified: branches/safari-602-branch/Source/WebCore/platform/mac/MediaRemoteSoftLink.h (206556 => 206557)


--- branches/safari-602-branch/Source/WebCore/platform/mac/MediaRemoteSoftLink.h	2016-09-28 22:13:31 UTC (rev 206556)
+++ branches/safari-602-branch/Source/WebCore/platform/mac/MediaRemoteSoftLink.h	2016-09-28 22:32:02 UTC (rev 206557)
@@ -39,7 +39,7 @@
 #define MRMediaRemoteRemoveCommandHandlerBlock softLink_MediaRemote_MRMediaRemoteRemoveCommandHandlerBlock
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteSetSupportedCommands, void, (CFArrayRef commands, MROriginRef origin, dispatch_queue_t replyQ, void(^completion)(MRMediaRemoteError err)), (commands, origin, replyQ, completion))
 #define MRMediaRemoteSetSupportedCommands softLink_MediaRemote_MRMediaRemoteSetSupportedCommands
-SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteSetNowPlayingVisibility, void, (MROriginRef origin, MRNowPlayingClientVisibility visibility), (origin, visibility))
+SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteSetNowPlayingVisibility, void, (MROriginRef origin, MRNowPlayingClientVisibility visibility), (origin, visibility))
 #define MRMediaRemoteSetNowPlayingVisibility softLink_MediaRemote_MRMediaRemoteSetNowPlayingVisibility
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, MediaRemote, MRMediaRemoteCommandInfoCreate, MRMediaRemoteCommandInfoRef, (CFAllocatorRef allocator), (allocator));
 #define MRMediaRemoteCommandInfoCreate softLink_MediaRemote_MRMediaRemoteCommandInfoCreate
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to