Title: [275318] branches/safari-611.1.21.0-branch/Source/WebKit
Revision
275318
Author
repst...@apple.com
Date
2021-03-31 16:34:00 -0700 (Wed, 31 Mar 2021)

Log Message

Cherry-pick r275316. rdar://problem/76077169

    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):

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

Modified Paths

Diff

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/ChangeLog (275317 => 275318)


--- branches/safari-611.1.21.0-branch/Source/WebKit/ChangeLog	2021-03-31 23:32:43 UTC (rev 275317)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/ChangeLog	2021-03-31 23:34:00 UTC (rev 275318)
@@ -1,3 +1,50 @@
+2021-03-31  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r275316. rdar://problem/76077169
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-24  Ruben Turcios  <rubent...@apple.com>
 
         Apply patch. rdar://problem/75744524

Modified: branches/safari-611.1.21.0-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (275317 => 275318)


--- branches/safari-611.1.21.0-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2021-03-31 23:32:43 UTC (rev 275317)
+++ branches/safari-611.1.21.0-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2021-03-31 23:34:00 UTC (rev 275318)
@@ -340,6 +340,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