Title: [255795] releases/WebKitGTK/webkit-2.28/Source/WebKit
Revision
255795
Author
[email protected]
Date
2020-02-05 02:50:05 -0800 (Wed, 05 Feb 2020)

Log Message

Merge r255677 - REGRESSION(r255595): page not closed after beforeunload handler returns true
https://bugs.webkit.org/show_bug.cgi?id=207189

Patch by Carlos Garcia Campos <[email protected]> on 2020-02-04
Reviewed by Chris Dumez.

We are assuming the try close did timeout in that case, because the timer is stopped before running the
beforeunload dialog.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Start the try close timer again when the beforeunload
dialog replies.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog (255794 => 255795)


--- releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog	2020-02-05 10:50:02 UTC (rev 255794)
+++ releases/WebKitGTK/webkit-2.28/Source/WebKit/ChangeLog	2020-02-05 10:50:05 UTC (rev 255795)
@@ -1,5 +1,19 @@
 2020-02-04  Carlos Garcia Campos  <[email protected]>
 
+        REGRESSION(r255595): page not closed after beforeunload handler returns true
+        https://bugs.webkit.org/show_bug.cgi?id=207189
+
+        Reviewed by Chris Dumez.
+
+        We are assuming the try close did timeout in that case, because the timer is stopped before running the
+        beforeunload dialog.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Start the try close timer again when the beforeunload
+        dialog replies.
+
+2020-02-04  Carlos Garcia Campos  <[email protected]>
+
         Unreviewed. [GTK] Add an env var to force single process model
 
         WEBKIT_USE_SINGLE_WEB_PROCESS=1 can be used to force the single process model when PSON is disabled. This is a

Modified: releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/WebPageProxy.cpp (255794 => 255795)


--- releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-02-05 10:50:02 UTC (rev 255794)
+++ releases/WebKitGTK/webkit-2.28/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-02-05 10:50:05 UTC (rev 255795)
@@ -5659,7 +5659,12 @@
     // Since runBeforeUnloadConfirmPanel() can spin a nested run loop we need to turn off the responsiveness timer and the tryClose timer.
     m_process->stopResponsivenessTimer();
     m_tryCloseTimeoutTimer.stop();
-    m_uiClient->runBeforeUnloadConfirmPanel(*this, message, frame, WTFMove(securityOrigin), WTFMove(reply));
+    m_uiClient->runBeforeUnloadConfirmPanel(*this, message, frame, WTFMove(securityOrigin),
+        [this, weakThis = makeWeakPtr(*this), completionHandler = WTFMove(reply)](bool shouldClose) mutable {
+            if (weakThis)
+                m_tryCloseTimeoutTimer.startOneShot(tryCloseTimeoutDelay);
+            completionHandler(shouldClose);
+    });
 }
 
 void WebPageProxy::didChangeViewportProperties(const ViewportAttributes& attr)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to