Changeset 224240 in webkit


Ignore:
Timestamp:
Oct 31, 2017 1:20:11 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Crash in: com.apple.WebKit: WebKit::CacheStorage::Caches::initializeSize(WTF::Function<void (std::optional<WebCore::DOMCacheEngine::Error>&&)>&&) + 30 (CacheStorageEngineCaches.cpp:163)
https://bugs.webkit.org/show_bug.cgi?id=179037

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-31
Reviewed by Chris Dumez.

Source/WebKit:

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::initializeSize): the storage backend may be cleared when clearing caches by the UI Process.
Returning early in that case. A web application will typically fail to open a cache in this case.
On retry, the cache should be opened.

LayoutTests:

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r224239 r224240  
     12017-10-31  Youenn Fablet  <youenn@apple.com>
     2
     3        Crash in:  com.apple.WebKit: WebKit::CacheStorage::Caches::initializeSize(WTF::Function<void (std::optional<WebCore::DOMCacheEngine::Error>&&)>&&) + 30 (CacheStorageEngineCaches.cpp:163)
     4        https://bugs.webkit.org/show_bug.cgi?id=179037
     5
     6        Reviewed by Chris Dumez.
     7
     8        * TestExpectations: Unskipping crashing tests.
     9
    1102017-10-31  Matt Lewis  <jlewis3@apple.com>
    211
  • trunk/LayoutTests/TestExpectations

    r224218 r224240  
    137137imported/w3c/web-platform-tests/secure-contexts/shared-worker-secure-first.https.html [ Skip ]
    138138
    139 # Skipping cache storage tests because they are causing a flaky crash.
    140 webkit.org/b/179035 imported/w3c/web-platform-tests/service-workers/cache-storage [ Skip ]
    141 
    142139# Skip service worker tests that are timing out.
     140imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https.html [ Skip ]
     141imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https.html [ Skip ]
     142imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https.html [ Skip ]
     143imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html [ Skip ]
     144imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html [ Skip ]
     145imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https.html [ Skip ]
     146imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https.html [ Skip ]
     147imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https.html [ Skip ]
     148imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https.html [ Skip ]
    143149imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https.html [ Skip ]
    144150imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https.html [ Skip ]
  • trunk/Source/WebKit/ChangeLog

    r224238 r224240  
     12017-10-31  Youenn Fablet  <youenn@apple.com>
     2
     3        Crash in:  com.apple.WebKit: WebKit::CacheStorage::Caches::initializeSize(WTF::Function<void (std::optional<WebCore::DOMCacheEngine::Error>&&)>&&) + 30 (CacheStorageEngineCaches.cpp:163)
     4        https://bugs.webkit.org/show_bug.cgi?id=179037
     5
     6        Reviewed by Chris Dumez.
     7
     8        * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
     9        (WebKit::CacheStorage::Caches::initializeSize): the storage backend may be cleared when clearing caches by the UI Process.
     10        Returning early in that case. A web application will typically fail to open a cache in this case.
     11        On retry, the cache should be opened.
     12
    1132017-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
    214
  • trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp

    r223558 r224240  
    160160void Caches::initializeSize(WebCore::DOMCacheEngine::CompletionCallback&& callback)
    161161{
     162    if (!m_storage) {
     163        callback(Error::Internal);
     164        return;
     165    }
     166
    162167    uint64_t size = 0;
    163168    m_storage->traverse({ }, 0, [protectedThis = makeRef(*this), this, protectedStorage = makeRef(*m_storage), callback = WTFMove(callback), size](const auto* storage, const auto& information) mutable {
Note: See TracChangeset for help on using the changeset viewer.