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

Changeset 227909 in webkit


Ignore:
Timestamp:
Jan 31, 2018, 11:14:51 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

com.apple.WebKit.Storage crashing at com.apple.WebCore: WebCore::SWServerRegistration::removeClientUsingRegistration
​https://bugs.webkit.org/show_bug.cgi?id=182316
<rdar://problem/37025976>

Patch by Youenn Fablet <​youenn@apple.com> on 2018-01-31
Reviewed by Chris Dumez.

SWServer.m_clientToControllingWorker and SWServerRegistration.m_clientsUsingRegistration might currently get out of sync.
This is a defensive fix to ensure storage process will not crash in Release.
We keep the ASSERT as this probably means there is an abnormal situation that other patches might fix.

  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::removeClientUsingRegistration):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r227904 r227909  
     12018-01-31  Youenn Fablet  <youenn@apple.com>
     2
     3        com.apple.WebKit.Storage crashing at com.apple.WebCore: WebCore::SWServerRegistration::removeClientUsingRegistration
     4        https://bugs.webkit.org/show_bug.cgi?id=182316
     5        <rdar://problem/37025976>
     6
     7        Reviewed by Chris Dumez.
     8
     9        SWServer.m_clientToControllingWorker and SWServerRegistration.m_clientsUsingRegistration might currently get out of sync.
     10        This is a defensive fix to ensure storage process will not crash in Release.
     11        We keep the ASSERT as this probably means there is an abnormal situation that other patches might fix.
     12
     13        * workers/service/server/SWServerRegistration.cpp:
     14        (WebCore::SWServerRegistration::removeClientUsingRegistration):
     15
    1162018-01-31  Antoine Quint  <graouts@apple.com>
    217
  • trunk/Source/WebCore/workers/service/server/SWServerRegistration.cpp

    r227221 r227909  
    182182    auto iterator = m_clientsUsingRegistration.find(clientIdentifier.serverConnectionIdentifier);
    183183    ASSERT(iterator != m_clientsUsingRegistration.end());
     184    if (iterator == m_clientsUsingRegistration.end())
     185        return;
     186
    184187    bool wasRemoved = iterator->value.remove(clientIdentifier.contextIdentifier);
    185188    ASSERT_UNUSED(wasRemoved, wasRemoved);
Note: See TracChangeset for help on using the changeset viewer.