Title: [248333] trunk/Source/WebKit
Revision
248333
Author
[email protected]
Date
2019-08-06 17:33:34 -0700 (Tue, 06 Aug 2019)

Log Message

Add release assertions to help catch a bug in our WebProcessCache implementation
https://bugs.webkit.org/show_bug.cgi?id=200483

Reviewed by Geoffrey Garen.

Add release assertions to help catch a bug in our WebProcessCache implementation. We
have evidence (rdar://problem/53962494) that we have processes with a page which
starts a provisional load while the process is in the WebProcessCache. This should
not be possible.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::setIsInProcessCache):
(WebKit::WebProcessProxy::addExistingWebPage):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248332 => 248333)


--- trunk/Source/WebKit/ChangeLog	2019-08-07 00:31:57 UTC (rev 248332)
+++ trunk/Source/WebKit/ChangeLog	2019-08-07 00:33:34 UTC (rev 248333)
@@ -1,3 +1,19 @@
+2019-08-06  Chris Dumez  <[email protected]>
+
+        Add release assertions to help catch a bug in our WebProcessCache implementation
+        https://bugs.webkit.org/show_bug.cgi?id=200483
+
+        Reviewed by Geoffrey Garen.
+
+        Add release assertions to help catch a bug in our WebProcessCache implementation. We
+        have evidence (rdar://problem/53962494) that we have processes with a page which
+        starts a provisional load while the process is in the WebProcessCache. This should
+        not be possible.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::setIsInProcessCache):
+        (WebKit::WebProcessProxy::addExistingWebPage):
+
 2019-08-06  Dean Jackson  <[email protected]>
 
         Context menu on a universal link produces a blank preview

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (248332 => 248333)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2019-08-07 00:31:57 UTC (rev 248332)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2019-08-07 00:33:34 UTC (rev 248333)
@@ -201,6 +201,12 @@
 
 void WebProcessProxy::setIsInProcessCache(bool value)
 {
+    if (value) {
+        RELEASE_ASSERT(m_pageMap.isEmpty());
+        RELEASE_ASSERT(!m_suspendedPageCount);
+        RELEASE_ASSERT(m_provisionalPages.isEmpty());
+    }
+
     ASSERT(m_isInProcessCache != value);
     m_isInProcessCache = value;
 
@@ -395,7 +401,7 @@
 {
     ASSERT(!m_pageMap.contains(webPage.pageID()));
     ASSERT(!globalPageMap().contains(webPage.pageID()));
-    ASSERT(!m_isInProcessCache);
+    RELEASE_ASSERT(!m_isInProcessCache);
     ASSERT(!m_websiteDataStore || m_websiteDataStore == &webPage.websiteDataStore());
 
     if (beginsUsingDataStore == BeginsUsingDataStore::Yes)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to