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

Changeset 254596 in webkit


Ignore:
Timestamp:
Jan 15, 2020, 11:15:02 AM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r254169. rdar://problem/58552876

REGRESSION (r248734): different threads write m_storageMap of StorageAreaImpl at the same time
​https://bugs.webkit.org/show_bug.cgi?id=205764
<rdar://problem/58179425>

Reviewed by Maciej Stachowiak.

In StorageAreaImpl, we avoid modifying m_storageMap from different threads at the same time by blocking main
thread access to it until the writes(importing items) of storage thread is done.

In r248734 we introduced a new case where the main thread could modify m_storageMap for session change, but we
didn't add the wait there.

  • Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::importItems): (WebKit::StorageAreaImpl::sessionChanged):

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

Location:
branches/safari-609-branch/Source/WebKitLegacy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-609-branch/Source/WebKitLegacy/ChangeLog

    r254009 r254596  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254169. rdar://problem/58552876
     4
     5    REGRESSION (r248734): different threads write m_storageMap of StorageAreaImpl at the same time
     6    https://bugs.webkit.org/show_bug.cgi?id=205764
     7    <rdar://problem/58179425>
     8   
     9    Reviewed by Maciej Stachowiak.
     10   
     11    In StorageAreaImpl, we avoid modifying m_storageMap from different threads at the same time by blocking main
     12    thread access to it until the writes(importing items) of storage thread is done.
     13   
     14    In r248734 we introduced a new case where the main thread could modify m_storageMap for session change, but we
     15    didn't add the wait there.
     16   
     17    * Storage/StorageAreaImpl.cpp:
     18    (WebKit::StorageAreaImpl::importItems):
     19    (WebKit::StorageAreaImpl::sessionChanged):
     20   
     21   
     22    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     23
     24    2020-01-07  Sihui Liu  <sihui_liu@apple.com>
     25
     26            REGRESSION (r248734): different threads write m_storageMap of StorageAreaImpl at the same time
     27            https://bugs.webkit.org/show_bug.cgi?id=205764
     28            <rdar://problem/58179425>
     29
     30            Reviewed by Maciej Stachowiak.
     31
     32            In StorageAreaImpl, we avoid modifying m_storageMap from different threads at the same time by blocking main
     33            thread access to it until the writes(importing items) of storage thread is done.
     34
     35            In r248734 we introduced a new case where the main thread could modify m_storageMap for session change, but we
     36            didn't add the wait there.
     37
     38            * Storage/StorageAreaImpl.cpp:
     39            (WebKit::StorageAreaImpl::importItems):
     40            (WebKit::StorageAreaImpl::sessionChanged):
     41
    1422020-01-03  Simon Fraser  <simon.fraser@apple.com>
    243
  • branches/safari-609-branch/Source/WebKitLegacy/Storage/StorageAreaImpl.cpp

    r248734 r254596  
    198198{
    199199    ASSERT(!m_isShutdown);
     200    ASSERT(!isMainThread());
    200201
    201202    m_storageMap->importItems(WTFMove(items));
    … …  
    297298    ASSERT(isMainThread());
    298299
     300    // If import is not completed, background storage thread may be modifying m_storageMap.
     301    blockUntilImportComplete();
     302
    299303    unsigned quota = m_storageMap->quota();
    300304    m_storageMap = StorageMap::create(quota);
Note: See TracChangeset for help on using the changeset viewer.