⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 281175 in webkit


Ignore:
Timestamp:
Aug 17, 2021, 5:55:59 PM (5 years ago)
Author:
sihui_liu@apple.com
Message:

Fix crash in TestWebKitAPI.NetworkProcess.CrashWhenNotAssociatedWithDataStore
​https://bugs.webkit.org/show_bug.cgi?id=229209
rdar://82040197

Reviewed by Geoffrey Garen.

When getting network process connection fails, we don't need to retry or crash UI process if web process is
already gone.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::getNetworkProcessConnection):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r281158 r281175  
     12021-08-17  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Fix crash in TestWebKitAPI.NetworkProcess.CrashWhenNotAssociatedWithDataStore
     4        https://bugs.webkit.org/show_bug.cgi?id=229209
     5        rdar://82040197
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        When getting network process connection fails, we don't need to retry or crash UI process if web process is
     10        already gone.
     11
     12        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
     13        (WebKit::WebsiteDataStore::getNetworkProcessConnection):
     14
    1152021-08-17  Fujii Hironori  <Hironori.Fujii@sony.com>
    216
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp

    r281096 r281175  
    17371737                    return;
    17381738
     1739                if (!webProcessProxy)
     1740                    return;
     1741
    17391742                int networkProcessIdentifier = 0;
    17401743                String networkProcessState = "Unknown"_s;
    … …  
    17431746                    networkProcessState = networkProcessProxy->stateString();
    17441747                }
    1745                 RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE("WebsiteDataStore::getNetworkProcessConnection: Failed to get connection - networkProcessProxy=%p, networkProcessIdentifier=%d, processState=%s, webProcessProxy=%p, webProcessIdentifier=%d", networkProcessProxy.get(), networkProcessIdentifier, networkProcessState.utf8().data(), webProcessProxy.get(), webProcessProxy ? webProcessProxy->processIdentifier() : 0);
     1748                RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE("WebsiteDataStore::getNetworkProcessConnection: Failed to get connection - networkProcessProxy=%p, networkProcessIdentifier=%d, processState=%s, webProcessProxy=%p, webProcessIdentifier=%d", networkProcessProxy.get(), networkProcessIdentifier, networkProcessState.utf8().data(), webProcessProxy.get(), webProcessProxy->processIdentifier());
    17461749#endif
    17471750            };
    17481751
    1749             if (shouldRetryOnFailure == ShouldRetryOnFailure::No) {
     1752            if (shouldRetryOnFailure == ShouldRetryOnFailure::No || !webProcessProxy) {
    17501753                logError();
    17511754                reply({ });
Note: See TracChangeset for help on using the changeset viewer.