| Index: Source/modules/cachestorage/Cache.cpp
|
| diff --git a/Source/modules/cachestorage/Cache.cpp b/Source/modules/cachestorage/Cache.cpp
|
| index ad74cd137bc74bbe5cd5d6c10f30b483873c6691..c4300a349d3bb9436a097f35dc43f8783a49babe 100644
|
| --- a/Source/modules/cachestorage/Cache.cpp
|
| +++ b/Source/modules/cachestorage/Cache.cpp
|
| @@ -554,15 +554,16 @@ ScriptPromise Cache::putImpl(ScriptState* scriptState, const HeapVector<Member<R
|
| }
|
|
|
| if (requests[i]->hasBody())
|
| - requests[i]->lockBody(Body::PassBody);
|
| + requests[i]->setBodyPassed();
|
| if (responses[i]->hasBody())
|
| - responses[i]->lockBody(Body::PassBody);
|
| + responses[i]->setBodyPassed();
|
|
|
| - if (OwnPtr<DrainingBodyStreamBuffer> buffer = responses[i]->createInternalDrainingStream()) {
|
| + BodyStreamBuffer* buffer = responses[i]->internalBodyBuffer();
|
| + if (buffer->hasBody()) {
|
| // If the response has body, read the all data and create
|
| // the blob handle and dispatch the put batch asynchronously.
|
| FetchDataLoader* loader = FetchDataLoader::createLoaderAsBlobHandle(responses[i]->internalMIMEType());
|
| - buffer->startLoading(loader, new BlobHandleCallbackForPut(i, barrierCallback, requests[i], responses[i]));
|
| + buffer->startLoading(scriptState->executionContext(), loader, new BlobHandleCallbackForPut(i, barrierCallback, requests[i], responses[i]));
|
| continue;
|
| }
|
|
|
|
|