You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cache.add and Cache.addAll should compute a correct response body size
https://bugs.webkit.org/show_bug.cgi?id=197464
Reviewed by Chris Dumez.
Source/WebCore:
Compute the response body size as we do for regular Cache.put
Test: http/wpt/cache-storage/cache-quota-add.any.html
* Modules/cache/CacheStorageConnection.cpp:
(WebCore::CacheStorageConnection::computeRecordBodySize):
* Modules/cache/CacheStorageConnection.h:
* Modules/cache/DOMCache.cpp:
(WebCore::FetchTasksHandler::addResponseBody):
(WebCore::DOMCache::addAll):
Compute the response body size requires getting access to the connection.
'this' is added to the lambda which is fine since taskHandler keeps a
Ref to 'this' in its completion handler.
(WebCore::DOMCache::toConnectionRecord):
* Modules/fetch/FetchResponse.h:
LayoutTests:
* http/wpt/cache-storage/cache-quota-add.any-expected.txt: Added.
* http/wpt/cache-storage/cache-quota-add.any.html: Added.
* http/wpt/cache-storage/cache-quota-add.any.js: Added.
Canonical link: https://commits.webkit.org/211710@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments