[Fullscreen] Restore ASSERT_NOT_REACHED() checks in exit fullscreen handler after...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 00:15:51 +0000 (00:15 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 00:15:51 +0000 (00:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186945
<rdar://problem/37277469>

Reviewed by Simon Fraser.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::exitFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
(VideoFullscreenInterfaceAVKit::cleanupFullscreen):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm

index fbb4273..a976634 100644 (file)
@@ -1,3 +1,16 @@
+2018-06-22  Jer Noble  <jer.noble@apple.com>
+
+        [Fullscreen] Restore ASSERT_NOT_REACHED() checks in exit fullscreen handler after r231924
+        https://bugs.webkit.org/show_bug.cgi?id=186945
+        <rdar://problem/37277469>
+
+        Reviewed by Simon Fraser.
+
+        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+        (VideoFullscreenInterfaceAVKit::exitFullscreen):
+        (VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
+        (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
+
 2018-06-22  Per Arne Vollan  <pvollan@apple.com>
 
         Unreviewed build fix on Windows.
index a755d1b..ac3fef7 100644 (file)
@@ -1011,8 +1011,10 @@ void VideoFullscreenInterfaceAVKit::exitFullscreen(const IntRect& finalRect)
         }];
     } else if (m_currentMode.isFullscreen()) {
         [m_playerViewController exitFullScreenAnimated:YES completionHandler:[protectedThis = makeRefPtr(this), this] (BOOL success, NSError* error) mutable {
-            if (!success)
+            if (!success) {
                 WTFLogAlways("-[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error %s", [[error localizedDescription] UTF8String]);
+                ASSERT_NOT_REACHED();
+            }
 
             m_exitCompleted = true;
 
@@ -1047,8 +1049,10 @@ void VideoFullscreenInterfaceAVKit::cleanupFullscreen()
     if (m_currentMode.hasFullscreen()) {
         [[m_playerViewController view] layoutIfNeeded];
         [m_playerViewController exitFullScreenAnimated:NO completionHandler:[] (BOOL success, NSError* error) {
-            if (!success)
+            if (!success) {
                 WTFLogAlways("-[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error %s", [[error localizedDescription] UTF8String]);
+                ASSERT_NOT_REACHED();
+            }
         }];
     }
     
@@ -1790,8 +1794,10 @@ void VideoFullscreenInterfaceAVKit::doExitFullscreen()
 
 void VideoFullscreenInterfaceAVKit::exitFullscreenHandler(BOOL success, NSError* error)
 {
-    if (!success)
+    if (!success) {
         WTFLogAlways("-[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error %s", [[error localizedDescription] UTF8String]);
+        ASSERT_NOT_REACHED();
+    }
 
     LOG(Fullscreen, "VideoFullscreenInterfaceAVKit::didExitFullscreen(%p) - %d", this, success);