REGRESSION(r243094): Automation: browser crash in WebAutomationSession::exitFullscree...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 16:03:31 +0000 (16:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 16:03:31 +0000 (16:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196140

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-03-22
Reviewed by Chris Dumez.

Since r243094, the WebPageProxy fullscreen manager is not created in the constructor, but once the page has a
process launched.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::exitFullscreenWindowForPage): Null check WebPageProxy::fullScreenManager() before
using it.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp

index 675094d..810a8fa 100644 (file)
@@ -1,3 +1,17 @@
+2019-03-22  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        REGRESSION(r243094): Automation: browser crash in WebAutomationSession::exitFullscreenWindowForPage()
+        https://bugs.webkit.org/show_bug.cgi?id=196140
+
+        Reviewed by Chris Dumez.
+
+        Since r243094, the WebPageProxy fullscreen manager is not created in the constructor, but once the page has a
+        process launched.
+
+        * UIProcess/Automation/WebAutomationSession.cpp:
+        (WebKit::WebAutomationSession::exitFullscreenWindowForPage): Null check WebPageProxy::fullScreenManager() before
+        using it.
+
 2019-03-22  Timothy Hatcher  <timothy@apple.com>
 
         Change macosx() to macos() in WK_API... and JSC_API... macros.
index ac5d542..d021689 100644 (file)
@@ -598,7 +598,7 @@ void WebAutomationSession::exitFullscreenWindowForPage(WebPageProxy& page, WTF::
 {
 #if ENABLE(FULLSCREEN_API)
     ASSERT(!m_windowStateTransitionCallback);
-    if (!page.fullScreenManager()->isFullScreen()) {
+    if (!page.fullScreenManager() || !page.fullScreenManager()->isFullScreen()) {
         completionHandler();
         return;
     }