Regression(r242580) WebKit.NetworkProcessCrashWithPendingConnection API is crashing...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2019 21:50:35 +0000 (21:50 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2019 21:50:35 +0000 (21:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195416

Reviewed by Antti Koivisto.

Drop ASSERT_NOT_REACHED() in WebPage::didCompletePageTransition() when the tree is still frozen due to
LayerTreeFreezeReason::ProcessSuspended. As demonstrated by this API test, nothing prevents a load from
completing and WebPage::didCompletePageTransition() to get called *after* WebProcess::prepareToSuspend()
has been called. From the logging during the test, I can tell that WebProcess::processDidResume() gets
called later on and the LayerTreeFreezeReason::ProcessSuspended freezing reason gets dropped, as expected.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCompletePageTransition):

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

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/WebPage.cpp

index 91606ee..74b438b 100644 (file)
@@ -1,5 +1,21 @@
 2019-03-07  Chris Dumez  <cdumez@apple.com>
 
+        Regression(r242580) WebKit.NetworkProcessCrashWithPendingConnection API is crashing on iOS debug
+        https://bugs.webkit.org/show_bug.cgi?id=195416
+
+        Reviewed by Antti Koivisto.
+
+        Drop ASSERT_NOT_REACHED() in WebPage::didCompletePageTransition() when the tree is still frozen due to
+        LayerTreeFreezeReason::ProcessSuspended. As demonstrated by this API test, nothing prevents a load from
+        completing and WebPage::didCompletePageTransition() to get called *after* WebProcess::prepareToSuspend()
+        has been called. From the logging during the test, I can tell that WebProcess::processDidResume() gets
+        called later on and the LayerTreeFreezeReason::ProcessSuspended freezing reason gets dropped, as expected.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::didCompletePageTransition):
+
+2019-03-07  Chris Dumez  <cdumez@apple.com>
+
         Clean up / simplify ProcessAssertion code
         https://bugs.webkit.org/show_bug.cgi?id=195394
 
index 840a02d..d57d969 100644 (file)
@@ -3144,12 +3144,6 @@ void WebPage::didCompletePageTransition()
 {
     unfreezeLayerTree(LayerTreeFreezeReason::PageTransition);
 
-    if (m_LayerTreeFreezeReasons.contains(LayerTreeFreezeReason::ProcessSuspended)) {
-        RELEASE_LOG_ERROR(ProcessSuspension, "%p - WebPage (PageID=%" PRIu64 ") - LayerTreeFreezeReason::ProcessSuspended was set when removing LayerTreeFreezeReason::PageTransition; current reasons are %d",
-            this, m_pageID, m_LayerTreeFreezeReasons.toRaw());
-        ASSERT_NOT_REACHED();
-    }
-
     RELEASE_LOG_IF_ALLOWED("%p - WebPage - Did complete page transition", this);
 
     bool isInitialEmptyDocument = !m_mainFrame;