Currently a blink::ReadableStream is returned from Response.prototype.body but we're planning to return a ReadableStream object implemented with v8 Extra.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b12939638f2fe7c5eabcc0dae0cac479651d9ba commit 2b12939638f2fe7c5eabcc0dae0cac479651d9ba Author: yhirano <yhirano@chromium.org> Date: Wed Apr 06 03:24:32 2016 Add another body function returning a V8 Extra ReadableStream to Response This CL adds a function to get body as a ReadableStream implemented with V8 Extra. The function is behind the flag. BUG= 596832 Review URL: https://codereview.chromium.org/1827373002 Cr-Commit-Position: refs/heads/master@{#385377} [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/v8-extra-body.js [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body-base-https-other-https.html [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body.html [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body-base-https-other-https.html [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body.html [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body-base-https-other-https.html [add] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body.html [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/Source/modules/fetch/Body.cpp [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/Source/modules/fetch/Body.h [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/Source/modules/fetch/Response.idl [modify] https://crrev.com/2b12939638f2fe7c5eabcc0dae0cac479651d9ba/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad commit 8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad Author: yhirano <yhirano@chromium.org> Date: Tue Apr 19 10:55:28 2016 [Fetch API] Add streams predicates to BodyStreamBuffer This CL adds predicates for the body stream in BodyStreamBuffer to make it easy to replace the stream with v8-extra based one. This CL doesn't change the behavior. BUG= 596832 Review URL: https://codereview.chromium.org/1895693004 Cr-Commit-Position: refs/heads/master@{#388180} [modify] https://crrev.com/8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad/third_party/WebKit/Source/modules/fetch/Body.cpp [modify] https://crrev.com/8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp [modify] https://crrev.com/8afb8bb77edb8c33d5f9aeb8741e31bc7474a0ad/third_party/WebKit/Source/modules/fetch/Response.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e0854ce1c44879edf75a8f7bfd936498b863f3c commit 9e0854ce1c44879edf75a8f7bfd936498b863f3c Author: yhirano <yhirano@chromium.org> Date: Wed Apr 20 03:32:16 2016 Add ReadableStream operations to use it from Fetch API This CL adds some ReadableStream operations as a preparation for using it from Fetch API (from BodyStreamBuffer, in particular). BUG= 596832 Review URL: https://codereview.chromium.org/1898873003 Cr-Commit-Position: refs/heads/master@{#388421} [modify] https://crrev.com/9e0854ce1c44879edf75a8f7bfd936498b863f3c/third_party/WebKit/Source/core/streams/ReadableStream.js [modify] https://crrev.com/9e0854ce1c44879edf75a8f7bfd936498b863f3c/third_party/WebKit/Source/core/streams/ReadableStreamOperations.cpp [modify] https://crrev.com/9e0854ce1c44879edf75a8f7bfd936498b863f3c/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h [modify] https://crrev.com/9e0854ce1c44879edf75a8f7bfd936498b863f3c/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b6ef89239544be60b3df1cb6c813e7a344c1fee7 commit b6ef89239544be60b3df1cb6c813e7a344c1fee7 Author: yhirano <yhirano@chromium.org> Date: Fri Apr 22 04:11:47 2016 BodyStreamBuffer's drainAs* function should lock stream BodyStreamBuffer::drainAsBlobDataHandle and BodyStreamBuffer::drainAsFormData should lock and disturb the associated stream when returning a non-null handle. Moreover, it should NOT lock and disturb the associated stream when returning a null handle. BUG= 596832 Review URL: https://codereview.chromium.org/1899163002 Cr-Commit-Position: refs/heads/master@{#389028} [modify] https://crrev.com/b6ef89239544be60b3df1cb6c813e7a344c1fee7/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/b6ef89239544be60b3df1cb6c813e7a344c1fee7/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/b6ef89239544be60b3df1cb6c813e7a344c1fee7/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp [modify] https://crrev.com/b6ef89239544be60b3df1cb6c813e7a344c1fee7/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/b6ef89239544be60b3df1cb6c813e7a344c1fee7/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/68e61c0671cfb913078d5d48200292339e7b52cd commit 68e61c0671cfb913078d5d48200292339e7b52cd Author: yhirano <yhirano@chromium.org> Date: Fri Apr 22 06:16:16 2016 [Streams] UnderlyingSourceBase should be kept alive only when locked In a situation that UnderlyingSourceBase lives in Blink and the associated stream is exposed to the script, we're relying on ActiveScriptWrappable mechanism to keep the underlying source alive even when it is unreachable from the script, because it is very difficult to handle the following script with other means. let stream = ...; let reader = stream.getReader(); let promise = reader.read(); reader = null; stream = null; // Now the script doesn't have a reference to the underlying source but we // need to keep it alive until the promise resolves or rejects. On the other hand, current UnderlyingSourceBase::hasPendingActivity returns true when the associated controller is active and it's too leaky. For example, fetch('/big-resource-with-cache-control-no-store'); leaks because no one read the body and the controller will stay active. This CL introduces notifyLockAcquired and notifyLockReleased to UnderlyingSourceBase to notify the locking status and make UnderlyingSourceBase::hasPendingActivity use the information. BUG= 596832 Review URL: https://codereview.chromium.org/1902963003 Cr-Commit-Position: refs/heads/master@{#389038} [modify] https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd/third_party/WebKit/Source/core/streams/ReadableStream.js [modify] https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp [modify] https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp [modify] https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h [modify] https://crrev.com/68e61c0671cfb913078d5d48200292339e7b52cd/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.idl
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4d1201da5903586ded0a446d670aa502af359c1a commit 4d1201da5903586ded0a446d670aa502af359c1a Author: yhirano <yhirano@chromium.org> Date: Fri Apr 22 09:32:27 2016 Make Response::body return v8-extra based stream behind flag This CL makes Response::body return a v8-extra based ReadableStream when ResponseBodyWithV8ExtraStream is enabled. This CL also deprecates Response.v8ExtraStreamBody(). BUG= 596832 Review URL: https://codereview.chromium.org/1899873006 Cr-Commit-Position: refs/heads/master@{#389063} [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/v8-extra-body.js [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body-base-https-other-https.html [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body.html [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body-base-https-other-https.html [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body.html [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body-base-https-other-https.html [delete] https://crrev.com/a74b8ccb63e527837449638b13e2c1534c40bddf/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body.html [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Body.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Body.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/FetchRequestData.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/FetchResponseData.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Request.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Request.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Request.idl [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/RequestTest.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Response.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Response.h [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/Response.idl [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp [modify] https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1e847c4832de7e730af916e9f8901eeb54c0df76 commit 1e847c4832de7e730af916e9f8901eeb54c0df76 Author: kjellander <kjellander@chromium.org> Date: Fri Apr 22 12:16:47 2016 Revert of Make Response::body return v8-extra based stream behind flag (patchset #5 id:160001 of https://codereview.chromium.org/1899873006/ ) Reason for revert: Several tests reports leaks after this: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/builds/18984 Original issue's description: > Make Response::body return v8-extra based stream behind flag > > This CL makes Response::body return a v8-extra based ReadableStream when > ResponseBodyWithV8ExtraStream is enabled. > > This CL also deprecates Response.v8ExtraStreamBody(). > > BUG= 596832 TBR=tyoshino@chromium.org,blink-reviews-bindings@chromium.org,yukishiino@chromium.org,haraken@chromium.org,horo@chromium.org,yhirano@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 596832 Review URL: https://codereview.chromium.org/1906403002 Cr-Commit-Position: refs/heads/master@{#389081} [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/v8-extra-body.js [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body-base-https-other-https.html [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body.html [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body-base-https-other-https.html [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body.html [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body-base-https-other-https.html [add] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body.html [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/cachestorage/Cache.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Body.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Body.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/FetchRequestData.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/FetchResponseData.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Request.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Request.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Request.idl [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/RequestTest.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Response.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Response.h [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/Response.idl [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp [modify] https://crrev.com/1e847c4832de7e730af916e9f8901eeb54c0df76/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/40a9fad2888f2e0395aac0fa1eae7a7c1ac0e262 commit 40a9fad2888f2e0395aac0fa1eae7a7c1ac0e262 Author: yhirano <yhirano@chromium.org> Date: Tue Apr 26 12:15:36 2016 [Fetch API] Fix leaky layout tests. Chrome implementation of Fetch API keep response alive while response.body is readable and locked by someone. This CL fix some layout tests to avoid leaks. See https://codereview.chromium.org/1899873006/ for more information. This CL also fixes 'acquiring a reader should not set bodyUsed' in stream-reader.js, because it was wrong but the assertion failure was caught and not reported. BUG= 596832 Review URL: https://codereview.chromium.org/1920703002 Cr-Commit-Position: refs/heads/master@{#389751} [modify] https://crrev.com/40a9fad2888f2e0395aac0fa1eae7a7c1ac0e262/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/body-mixin.js [modify] https://crrev.com/40a9fad2888f2e0395aac0fa1eae7a7c1ac0e262/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js [modify] https://crrev.com/40a9fad2888f2e0395aac0fa1eae7a7c1ac0e262/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/stream-reader.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/053e4d396a034a48fb6d00525b249e9fdd6ac70e commit 053e4d396a034a48fb6d00525b249e9fdd6ac70e Author: yhirano <yhirano@chromium.org> Date: Wed Apr 27 09:32:45 2016 Make Response::body return v8-extra based stream behind flag This CL makes Response::body return a v8-extra based ReadableStream when ResponseBodyWithV8ExtraStream is enabled. This CL also deprecates Response.v8ExtraStreamBody(). BUG= 596832 Committed: https://crrev.com/4d1201da5903586ded0a446d670aa502af359c1a Cr-Commit-Position: refs/heads/master@{#389063} Review URL: https://codereview.chromium.org/1899873006 Cr-Commit-Position: refs/heads/master@{#390031} [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/v8-extra-body.js [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body-base-https-other-https.html [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/v8-extra-body.html [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body-base-https-other-https.html [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/window/v8-extra-body.html [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body-base-https-other-https.html [delete] https://crrev.com/a43ce6005d3bbd512daa90ed37e0a127aba7f897/third_party/WebKit/LayoutTests/http/tests/fetch/workers/v8-extra-body.html [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/core/streams/UnderlyingSourceBase.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/cachestorage/Cache.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Body.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Body.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/FetchManager.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/FetchRequestData.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/FetchResponseData.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/GlobalFetch.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Request.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Request.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Request.idl [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/RequestTest.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Response.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Response.h [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/Response.idl [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp [modify] https://crrev.com/053e4d396a034a48fb6d00525b249e9fdd6ac70e/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4cdc2945869f26e2394e9f05b5564613c53d42d0 commit 4cdc2945869f26e2394e9f05b5564613c53d42d0 Author: yhirano <yhirano@chromium.org> Date: Mon May 02 12:24:30 2016 [Streams] Remove SetReadableStreamDisturbed from ReadableStream.js This CL removes SetReadableStreamDisturbed from ReadableStream.js. The operation is used to mark the stream disturbed while not pulling from the source, but we can do that without the operation by closing the stream first and then making a read call. BUG= 596832 Review-Url: https://codereview.chromium.org/1908213004 Cr-Commit-Position: refs/heads/master@{#390923} [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/core/streams/ReadableStream.js [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/core/streams/ReadableStreamOperations.cpp [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp [modify] https://crrev.com/4cdc2945869f26e2394e9f05b5564613c53d42d0/third_party/WebKit/Source/modules/fetch/Request.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0480aa344bc4fff82247d862d00ae872334200b2 commit 0480aa344bc4fff82247d862d00ae872334200b2 Author: yhirano <yhirano@chromium.org> Date: Mon May 16 15:00:49 2016 [Fetch API] |(new Response(stream)).body| should return |stream| This change is behind responseConstructedWithReadableStream and responseBodyWithV8ExtraStream. BUG= 596832 Review-Url: https://codereview.chromium.org/1969333002 Cr-Commit-Position: refs/heads/master@{#393832} [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/core/streams/ReadableStream.js [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/core/streams/ReadableStreamOperations.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/core/streams/ReadableStreamOperations.h [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/core/streams/ReadableStreamOperationsTest.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/Response.cpp [modify] https://crrev.com/0480aa344bc4fff82247d862d00ae872334200b2/third_party/WebKit/Source/modules/fetch/Response.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2 commit e0cb6a355deab56251cea1ac5b2bcc4b605c76e2 Author: yhirano <yhirano@chromium.org> Date: Sat May 21 01:34:19 2016 Ship "Response construction with ReadableStream". Intent-To-Ship thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/0S-jPuCy8ws BUG= 564479 , 596832 Review-Url: https://codereview.chromium.org/1993033003 Cr-Commit-Position: refs/heads/master@{#395223} [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/build/common.gypi [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/build_overrides/v8.gni [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/Source/core/streams/README.md [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/Source/core/streams/ReadableByteStream.idl [delete] https://crrev.com/53f7ec90b80cf9c2371c1570d0b1ce2e63332018/third_party/WebKit/Source/core/streams/ReadableStreamTempStub.js [modify] https://crrev.com/e0cb6a355deab56251cea1ac5b2bcc4b605c76e2/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6171b2028afb8cfea903ecee7605fca23f9a4522 commit 6171b2028afb8cfea903ecee7605fca23f9a4522 Author: Yutaka Hirano <yhirano@chromium.org> Date: Tue May 24 01:20:10 2016 Ship "Response construction with ReadableStream". Intent-To-Ship thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/0S-jPuCy8ws BUG= 564479 , 596832 Review-Url: https://codereview.chromium.org/1993033003 Cr-Commit-Position: refs/heads/master@{#395223} (cherry picked from commit e0cb6a355deab56251cea1ac5b2bcc4b605c76e2) Review URL: https://codereview.chromium.org/2008673003 . Cr-Commit-Position: refs/branch-heads/2743@{#24} Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/build/common.gypi [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/build_overrides/v8.gni [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/Source/core/streams/README.md [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/Source/core/streams/ReadableByteStream.idl [delete] https://crrev.com/8be70850ebcd3ec9433ba7606521c44009e96655/third_party/WebKit/Source/core/streams/ReadableStreamTempStub.js [modify] https://crrev.com/6171b2028afb8cfea903ecee7605fca23f9a4522/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
Comment 1 by bugdroid1@chromium.org
, Apr 6 2016