Changeset 254501 in webkit


Ignore:
Timestamp:
Jan 14, 2020 1:17:46 AM (4 years ago)
Author:
youenn@apple.com
Message:

CacheStorage::Engine::clearCachesForOriginFromDisk ASSERT is buggy
https://bugs.webkit.org/show_bug.cgi?id=206057
<rdar://problem/57762994>

Reviewed by John Wilander.

The ASSERT is only valid if the engine is initialized.
It is not needed to initialize it if the plan is to remove all disk files.
Instead, update ASSERT to check that either m_salt is not there or the salt is there and the path is as expected.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r254499 r254501  
     12020-01-14  youenn fablet  <youenn@apple.com>
     2
     3        CacheStorage::Engine::clearCachesForOriginFromDisk ASSERT is buggy
     4        https://bugs.webkit.org/show_bug.cgi?id=206057
     5        <rdar://problem/57762994>
     6
     7        Reviewed by John Wilander.
     8
     9        The ASSERT is only valid if the engine is initialized.
     10        It is not needed to initialize it if the plan is to remove all disk files.
     11        Instead, update ASSERT to check that either m_salt is not there or the salt is there and the path is as expected.
     12
     13        * NetworkProcess/cache/CacheStorageEngine.cpp:
     14        (WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):
     15
    1162020-01-14  Eric Carlson  <eric.carlson@apple.com>
    217
  • trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp

    r253621 r254501  
    745745                return;
    746746
    747             ASSERT(folderPath == cachesRootPath(*folderOrigin));
     747            // If cache salt is initialized and the paths do not match, some cache files have probably be removed or partially corrupted.
     748            ASSERT(!m_salt || folderPath == cachesRootPath(*folderOrigin));
    748749            deleteDirectoryRecursivelyOnBackgroundThread(folderPath, [callbackAggregator = WTFMove(callbackAggregator)] { });
    749750        });
Note: See TracChangeset for help on using the changeset viewer.