Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Optimized Fullscreen fails to cleanup because of no longer necessary …
…release of m_playerController in exitFullscreen()

https://bugs.webkit.org/show_bug.cgi?id=143120

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-03-26
Reviewed by Eric Carlson.

We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure
media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
media state via resetMediaState(). m_playerController is already released in
WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
fullscreen process from completing successfully.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):

Canonical link: https://commits.webkit.org/161158@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Jeremy Jones authored and webkit-commit-queue committed Mar 27, 2015
1 parent 4750470 commit 91a128d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
2015-03-26 Jeremy Jones <jeremyj@apple.com>

Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
https://bugs.webkit.org/show_bug.cgi?id=143120

Reviewed by Eric Carlson.

We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure
media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
media state via resetMediaState(). m_playerController is already released in
WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
fullscreen process from completing successfully.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):

2015-03-26 Zalan Bujtas <zalan@apple.com>

Inline continuation code should not take anonymous containing wrapper granted.
Expand Down
Expand Up @@ -1024,8 +1024,6 @@ - (AVVideoLayerGravity)videoLayerGravity
return;
}

m_playerController = nil;

dispatch_async(dispatch_get_main_queue(), [strongThis, finalRect] {
strongThis->exitFullscreenInternal(finalRect);
});
Expand Down

0 comments on commit 91a128d

Please sign in to comment.