CacheStorage::Engine should keep a list of initialization callback
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 May 2018 16:41:55 +0000 (16:41 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 May 2018 16:41:55 +0000 (16:41 +0000)
commitd0942cb0ebdb6ee998d607877162f5802410fe47
tree58a8ae3d6bdbaadcd7761737b5654d927ac92480
parent9ba9a10eb476ea8aed7e486dd379d2d2db10ee70
CacheStorage::Engine should keep a list of initialization callback
https://bugs.webkit.org/show_bug.cgi?id=185184
<rdar://problem/38875651>

Reviewed by Antti Koivisto.

Source/WebKit:

Keep each initialize callback in a Vector so as to compute the salt only once.
Call all callbacks then in a loop.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::~Engine):
(WebKit::CacheStorage::Engine::initialize):
* NetworkProcess/cache/CacheStorageEngine.h:

LayoutTests:

* http/wpt/cache-storage/a-cache-open.https-expected.txt: Added.
* http/wpt/cache-storage/a-cache-open.https.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/wpt/cache-storage/a-cache-open.https-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/cache-storage/a-cache-open.https.html [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.h