Changeset 252809 in webkit


Ignore:
Timestamp:
Nov 22, 2019 3:14:13 PM (4 years ago)
Author:
achristensen@apple.com
Message:

Null check callback in NetworkConnectionToWebProcess::didDeliverMessagePortMessages
https://bugs.webkit.org/show_bug.cgi?id=204460
<rdar://problem/57348618>

Reviewed by Chris Dumez.

When the network process crashes during a message port connection establishment,
a web process may have an identifier that becomes stale. In this case, we should not crash again.
No test because this only happens during a rare race condition after a network process crash, but the radar shows records of this happening.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didDeliverMessagePortMessages):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r252805 r252809  
     12019-11-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Null check callback in NetworkConnectionToWebProcess::didDeliverMessagePortMessages
     4        https://bugs.webkit.org/show_bug.cgi?id=204460
     5        <rdar://problem/57348618>
     6
     7        Reviewed by Chris Dumez.
     8
     9        When the network process crashes during a message port connection establishment,
     10        a web process may have an identifier that becomes stale.  In this case, we should not crash again.
     11        No test because this only happens during a rare race condition after a network process crash, but the radar shows records of this happening.
     12
     13        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
     14        (WebKit::NetworkConnectionToWebProcess::didDeliverMessagePortMessages):
     15
    1162019-11-22  Sihui Liu  <sihui_liu@apple.com>
    217
  • trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp

    r251823 r252809  
    995995void NetworkConnectionToWebProcess::didDeliverMessagePortMessages(uint64_t messageBatchIdentifier)
    996996{
    997     auto callback = m_messageBatchDeliveryCompletionHandlers.take(messageBatchIdentifier);
    998     ASSERT(callback);
    999     callback();
     997    // Null check only necessary for rare condition where network process crashes during message port connection establishment.
     998    if (auto callback = m_messageBatchDeliveryCompletionHandlers.take(messageBatchIdentifier))
     999        callback();
    10001000}
    10011001
Note: See TracChangeset for help on using the changeset viewer.