Title: [275316] trunk/Source/WebKit
Revision
275316
Author
cdu...@apple.com
Date
2021-03-31 16:19:48 -0700 (Wed, 31 Mar 2021)

Log Message

REGRESSION: The NetworkProcess fails to relaunch after it crashes
https://bugs.webkit.org/show_bug.cgi?id=224022
<rdar://75148724>

Reviewed by Darin Adler.

NetworkProcessProxy::networkProcessCrashed() failed to clear defaultNetworkProcess() like we do on
network process termination (in NetworkProcessProxy::didTerminate()). As a result, upon a
network process crash, WebsiteDataStore::networkProcessCrashed() would get called and
properly clear WebsiteDataStore::m_networkProcess. However, when calling
WebsiteDataStore::networkProcess() later on, it would re-initialize m_networkProcess with
the same dead NetworkProcessProxy, since networkProcessForSession() relies on
NetworkProcessProxy::defaultNetworkProcess().

No new tests, will land an API test shortly as a follow-up.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::networkProcessCrashed):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (275315 => 275316)


--- trunk/Source/WebKit/ChangeLog	2021-03-31 23:15:58 UTC (rev 275315)
+++ trunk/Source/WebKit/ChangeLog	2021-03-31 23:19:48 UTC (rev 275316)
@@ -1,3 +1,24 @@
+2021-03-31  Chris Dumez  <cdu...@apple.com>
+
+        REGRESSION: The NetworkProcess fails to relaunch after it crashes
+        https://bugs.webkit.org/show_bug.cgi?id=224022
+        <rdar://75148724>
+
+        Reviewed by Darin Adler.
+
+        NetworkProcessProxy::networkProcessCrashed() failed to clear defaultNetworkProcess() like we do on
+        network process termination (in NetworkProcessProxy::didTerminate()). As a result, upon a
+        network process crash, WebsiteDataStore::networkProcessCrashed() would get called and
+        properly clear WebsiteDataStore::m_networkProcess. However, when calling
+        WebsiteDataStore::networkProcess() later on, it would re-initialize m_networkProcess with
+        the same dead NetworkProcessProxy, since networkProcessForSession() relies on
+        NetworkProcessProxy::defaultNetworkProcess().
+
+        No new tests, will land an API test shortly as a follow-up.
+
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::networkProcessCrashed):
+
 2021-03-31  Eric Carlson  <eric.carl...@apple.com>
 
         [macOS] MediaSessionCoordinator should have join and leave methods

Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (275315 => 275316)


--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2021-03-31 23:15:58 UTC (rev 275315)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2021-03-31 23:19:48 UTC (rev 275316)
@@ -348,6 +348,9 @@
 
 void NetworkProcessProxy::networkProcessCrashed()
 {
+    if (defaultProcess() == this)
+        defaultProcess() = nullptr;
+
     clearCallbackStates();
 
     Ref<NetworkProcessProxy> protectedThis(*this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to