Changeset 280568 in webkit
- Timestamp:
- Aug 2, 2021, 4:19:18 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/mac/WKFullScreenWindowController.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r280567 r280568 1 2021-08-02 Jean-Yves Avenard <jya@apple.com> 2 3 Crash in -[WKFullScreenWindowController windowDidExitFullScreen:] 4 https://bugs.webkit.org/show_bug.cgi?id=228694 5 rdar://79569881 6 7 Reviewed by Jer Noble. 8 9 It appears that [WKFullScreenWindowController finishedEnterFullScreenAnimation] can 10 cause the retain count to be decreased (this is the only explanation that makes any 11 sense considering the crash and when the regression started following bug 227243). 12 No test, can't reproduce. 13 14 * UIProcess/mac/WKFullScreenWindowController.mm: 15 (-[WKFullScreenWindowController setVideoFullscreenManagerClient:]): Add utility method 16 to remove duplicated code. 17 (-[WKFullScreenWindowController didExitPictureInPicture]): 18 (-[WKFullScreenWindowController windowDidEnterFullScreen:]): 19 (-[WKFullScreenWindowController windowDidFailToExitFullScreen:]): 20 (-[WKFullScreenWindowController windowDidExitFullScreen:]): 21 (-[WKFullScreenWindowController _manager]): fly-by make style consistent with other 22 similar methods. 23 1 24 2021-08-02 Alex Christensen <achristensen@webkit.org> 2 25 -
trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.mm
r280358 r280568 646 646 } 647 647 648 - (void) didExitPictureInPicture648 - (void)setVideoFullscreenManagerClient:(WebKit::VideoFullscreenManagerProxyClient *)client 649 649 { 650 650 if (auto* videoFullscreenManager = self._videoFullscreenManager) { 651 651 ASSERT(videoFullscreenManager->client() == &_videoFullscreenManagerProxyClient); 652 videoFullscreenManager->setClient( nullptr);652 videoFullscreenManager->setClient(client); 653 653 } 654 } 655 656 - (void)didExitPictureInPicture 657 { 658 [self setVideoFullscreenManagerClient:nullptr]; 654 659 } 655 660 … … 684 689 - (void)windowDidEnterFullScreen:(NSNotification *)notification 685 690 { 691 RetainPtr<WKFullScreenWindowController> retain = self; 686 692 [self finishedEnterFullScreenAnimation:YES]; 687 688 if (auto* videoFullscreenManager = self._videoFullscreenManager) { 689 ASSERT(videoFullscreenManager->client() == nullptr); 690 videoFullscreenManager->setClient(&_videoFullscreenManagerProxyClient); 691 } 693 [self setVideoFullscreenManagerClient:&_videoFullscreenManagerProxyClient]; 692 694 } 693 695 694 696 - (void)windowDidFailToExitFullScreen:(NSWindow *)window 695 697 { 698 RetainPtr<WKFullScreenWindowController> retain = self; 696 699 [self finishedExitFullScreenAnimation:NO]; 700 [self setVideoFullscreenManagerClient:nullptr]; 697 701 } 698 702 699 703 - (void)windowDidExitFullScreen:(NSNotification *)notification 700 704 { 705 RetainPtr<WKFullScreenWindowController> retain = self; 701 706 [self finishedExitFullScreenAnimation:YES]; 702 703 if (auto* videoFullscreenManager = self._videoFullscreenManager) { 704 ASSERT(videoFullscreenManager->client() == &_videoFullscreenManagerProxyClient); 705 videoFullscreenManager->setClient(nullptr); 706 } 707 [self setVideoFullscreenManagerClient:nullptr]; 707 708 } 708 709 … … 719 720 if (!_page) 720 721 return nullptr; 722 721 723 return _page->fullScreenManager(); 722 724 }
Note:
See TracChangeset
for help on using the changeset viewer.