Skip to content
Permalink
Browse files
Crash in: com.apple.WebKit: WebKit::CacheStorage::Caches::initializeS…
…ize(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:

* TestExpectations: Unskipping crashing tests.

Canonical link: https://commits.webkit.org/195196@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Oct 31, 2017
1 parent 3fbce67 commit 2819e6a0e7b7c4df8809f5c8ded7aede62099de1
Showing 4 changed files with 35 additions and 3 deletions.
@@ -1,3 +1,12 @@
2017-10-31 Youenn Fablet <youenn@apple.com>

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

Reviewed by Chris Dumez.

* TestExpectations: Unskipping crashing tests.

2017-10-31 Matt Lewis <jlewis3@apple.com>

Adjusted test expectations for animations/needs-layout.html.
@@ -136,10 +136,16 @@ imported/w3c/web-platform-tests/secure-contexts/basic-shared-worker.https.html [
imported/w3c/web-platform-tests/secure-contexts/shared-worker-insecure-first.https.html [ Skip ]
imported/w3c/web-platform-tests/secure-contexts/shared-worker-secure-first.https.html [ Skip ]

# Skipping cache storage tests because they are causing a flaky crash.
webkit.org/b/179035 imported/w3c/web-platform-tests/service-workers/cache-storage [ Skip ]

# Skip service worker tests that are timing out.
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event.https.html [ Skip ]
@@ -1,3 +1,15 @@
2017-10-31 Youenn Fablet <youenn@apple.com>

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

Reviewed by Chris Dumez.

* 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.

2017-10-31 Wenson Hsieh <wenson_hsieh@apple.com>

[Attachment Support] Implement WKWebView SPI for inserting attachment elements
@@ -159,6 +159,11 @@ void Caches::initialize(WebCore::DOMCacheEngine::CompletionCallback&& callback)

void Caches::initializeSize(WebCore::DOMCacheEngine::CompletionCallback&& callback)
{
if (!m_storage) {
callback(Error::Internal);
return;
}

uint64_t size = 0;
m_storage->traverse({ }, 0, [protectedThis = makeRef(*this), this, protectedStorage = makeRef(*m_storage), callback = WTFMove(callback), size](const auto* storage, const auto& information) mutable {
if (!storage) {

0 comments on commit 2819e6a

Please sign in to comment.