[Cache API] Add support for overwriting responses with put on an existing record
[WebKit-https.git] / Source / WebCore / Modules / cache / WorkerCacheStorageConnection.cpp
index e5593a702655263916979de3d1d57339beb1f98d..10aa6549461b97826d4331fb342a81433cdfbd4c 100644 (file)
@@ -40,6 +40,7 @@ namespace WebCore {
 
 struct CrossThreadRecordData {
     uint64_t identifier;
+    uint64_t updateResponseCounter;
 
     FetchHeaders::Guard requestHeadersGuard;
     ResourceRequest request;
@@ -56,6 +57,7 @@ static CrossThreadRecordData toCrossThreadRecordData(const CacheStorageConnectio
 {
     return CrossThreadRecordData {
         record.identifier,
+        record.updateResponseCounter,
         record.requestHeadersGuard,
         record.request.isolatedCopy(),
         record.options.isolatedCopy(),
@@ -70,6 +72,7 @@ static CacheStorageConnection::Record fromCrossThreadRecordData(CrossThreadRecor
 {
     return CacheStorageConnection::Record {
         data.identifier,
+        data.updateResponseCounter,
         data.requestHeadersGuard,
         WTFMove(data.request),
         WTFMove(data.options),