Changeset 228924 in webkit


Ignore:
Timestamp:
Feb 22, 2018 10:48:34 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time
https://bugs.webkit.org/show_bug.cgi?id=183041

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-22
Reviewed by Chris Dumez.

  • Modules/cache/WorkerCacheStorageConnection.cpp:

(WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the
case of an already deleted cache, i.e. returned identifer is 0.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228923 r228924  
     12018-02-22  Youenn Fablet  <youenn@apple.com>
     2
     3        WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time
     4        https://bugs.webkit.org/show_bug.cgi?id=183041
     5
     6        Reviewed by Chris Dumez.
     7
     8        * Modules/cache/WorkerCacheStorageConnection.cpp:
     9        (WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the
     10        case of an already deleted cache, i.e. returned identifer is 0.
     11
    1122018-02-22  Alejandro G. Castro  <alex@igalia.com>
    213
  • trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp

    r226481 r228924  
    125125    callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, cacheIdentifier] () mutable {
    126126        mainThreadConnection->remove(cacheIdentifier, [workerThread = WTFMove(workerThread), requestIdentifier, cacheIdentifier] (const CacheIdentifierOrError& result) mutable {
    127             ASSERT_UNUSED(cacheIdentifier, !result.has_value() || result.value().identifier == cacheIdentifier);
     127            ASSERT_UNUSED(cacheIdentifier, !result.has_value() || !result.value().identifier || result.value().identifier == cacheIdentifier);
    128128            workerThread->runLoop().postTaskForMode([requestIdentifier, result] (auto& scope) mutable {
    129129                downcast<WorkerGlobalScope>(scope).cacheStorageConnection().removeCompleted(requestIdentifier, result);
Note: See TracChangeset for help on using the changeset viewer.