Reject promises in case of internal CacheStorage engine errors.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 18:16:16 +0000 (18:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 18:16:16 +0000 (18:16 +0000)
commitaab9b1242c8ee66de926b08f32cb4b32842525a3
tree9ec8d86a8baf9fa0a42bbd512784937b00f2f331
parent0bdef0b2a563342836b03aa3289be15c0466fa20
Reject promises in case of internal CacheStorage engine errors.
https://bugs.webkit.org/show_bug.cgi?id=176194

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-01
Reviewed by Alex Christensen.

No new tests as this covers error cases that should not happen in regular cases.
Replacing lambdas that take no parameters to lambdas taking an optional error.
Reject promise if an error is found.

* Modules/cache/Cache.cpp:
(WebCore::Cache::doMatch):
(WebCore::Cache::matchAll):
(WebCore::Cache::keys):
(WebCore::Cache::retrieveRecords):
(WebCore::Cache::queryCache):
* Modules/cache/Cache.h:
* Modules/cache/CacheStorage.cpp:
(WebCore::CacheStorage::match):
(WebCore::CacheStorage::has):
(WebCore::CacheStorage::retrieveCaches):
(WebCore::CacheStorage::open):
(WebCore::CacheStorage::remove):
(WebCore::CacheStorage::keys):
* Modules/cache/CacheStorage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/cache/Cache.cpp
Source/WebCore/Modules/cache/Cache.h
Source/WebCore/Modules/cache/CacheStorage.cpp
Source/WebCore/Modules/cache/CacheStorage.h