Internals clearCacheStorageMemoryRepresentation should return a Promise
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Sep 2017 20:56:22 +0000 (20:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Sep 2017 20:56:22 +0000 (20:56 +0000)
commit4dab79b77f0579e4a27e2eb18ecb66067b565a45
tree96b80530598103d31b4d443c6ba8f4dccf123ec4
parent5646a93bfbff693f8c7adf86cec6b2b5f8b008f0
Internals clearCacheStorageMemoryRepresentation should return a Promise
https://bugs.webkit.org/show_bug.cgi?id=176818

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

Source/WebCore:

No observable change of behavior.

* Modules/cache/DOMCacheEngine.h:
* testing/Internals.cpp:
(WebCore::Internals::clearCacheStorageMemoryRepresentation): Returning a promise when clearing is completed.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Adding a completion handler to clearMemoryRepresentation.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::clearMemoryRepresentation):
* NetworkProcess/cache/CacheStorageEngine.h:
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
(WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
* NetworkProcess/cache/CacheStorageEngineConnection.h:
* NetworkProcess/cache/CacheStorageEngineConnection.messages.in:
* WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::clearMemoryRepresentation):
(WebKit::WebCacheStorageConnection::clearMemoryRepresentationCompleted):
* WebProcess/Cache/WebCacheStorageConnection.h:
* WebProcess/Cache/WebCacheStorageConnection.messages.in:

LayoutTests:

Updating tests to interact with the caches after the clearCacheStorageMemoryRepresentation promise is completed.

* http/tests/cache-storage/cache-origins.https.html:
* http/tests/cache-storage/cache-persistency.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/cache-storage/cache-origins.https.html
LayoutTests/http/tests/cache-storage/cache-persistency.https.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/cache/DOMCacheEngine.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.h
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.cpp
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.h
Source/WebKit/NetworkProcess/cache/CacheStorageEngineConnection.messages.in
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.h
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.messages.in