Changeset 245913 in webkit


Ignore:
Timestamp:
May 30, 2019 5:08:04 PM (5 years ago)
Author:
youenn@apple.com
Message:

REGRESSION (r245873) [Mac WK2] Layout Test http/wpt/service-workers/update-service-worker.https.html is a flaky crash after running new test
https://bugs.webkit.org/show_bug.cgi?id=198379
<rdar://problem/51264361>

Reviewed by Alex Christensen.

This case can happen when network process is crashing.
Given the WebSWClientConnection may be kept alive, it might reregister itself but in that case will never be unregistered.
Remove the WebSWClientConnection from the NetworkProcessConnection corresponding map on destruction time.
Covered by no longer crashing tests.

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::removeSWClientConnection):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::~WebSWClientConnection):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245911 r245913  
     12019-05-30  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r245873) [Mac WK2] Layout Test http/wpt/service-workers/update-service-worker.https.html is a flaky crash after running new test
     4        https://bugs.webkit.org/show_bug.cgi?id=198379
     5        <rdar://problem/51264361>
     6
     7        Reviewed by Alex Christensen.
     8
     9        This case can happen when network process is crashing.
     10        Given the WebSWClientConnection may be kept alive, it might reregister itself but in that case will never be unregistered.
     11        Remove the WebSWClientConnection from the NetworkProcessConnection corresponding map on destruction time.
     12        Covered by no longer crashing tests.
     13
     14        * WebProcess/Network/NetworkProcessConnection.cpp:
     15        (WebKit::NetworkProcessConnection::removeSWClientConnection):
     16        * WebProcess/Network/NetworkProcessConnection.h:
     17        * WebProcess/Storage/WebSWClientConnection.cpp:
     18        (WebKit::WebSWClientConnection::~WebSWClientConnection):
     19
    1202019-05-30  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp

    r245873 r245913  
    266266}
    267267
     268void NetworkProcessConnection::removeSWClientConnection(WebSWClientConnection& connection)
     269{
     270    ASSERT(m_swConnectionsByIdentifier.contains(connection.serverConnectionIdentifier()));
     271    m_swConnectionsByIdentifier.remove(connection.serverConnectionIdentifier());
     272}
     273
    268274SWServerConnectionIdentifier NetworkProcessConnection::initializeSWClientConnection(WebSWClientConnection& connection)
    269275{
  • trunk/Source/WebKit/WebProcess/Network/NetworkProcessConnection.h

    r245873 r245913  
    7878
    7979    WebCore::SWServerConnectionIdentifier initializeSWClientConnection(WebSWClientConnection&);
     80    void removeSWClientConnection(WebSWClientConnection&);
    8081#endif
    8182
  • trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp

    r245873 r245913  
    6363WebSWClientConnection::~WebSWClientConnection()
    6464{
     65    if (m_connection)
     66        WebProcess::singleton().ensureNetworkProcessConnection().removeSWClientConnection(*this);
    6567}
    6668
Note: See TracChangeset for help on using the changeset viewer.