Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 1506023003: Response construction with a ReadableStream (Closed)

Created:
5 years ago by yhirano
Modified:
5 years ago
CC:
domenic, blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Response construction with a ReadableStream This CL implements Response construction with a ReadableStream provided by V8 Extras. The feature is behind a runtime enabled flag. The implementation is not perfect. - ReadableStreamDataConsumerHandle should be thread-safe but is not. - ReadableStreamDataConsumerHandle may cause memory leaks. But these problems don't bother stable users. BUG=564479 Committed: https://crrev.com/6aa006ba0f0f8a60c20167ad009f5699e40b8ef2 Cr-Commit-Position: refs/heads/master@{#364968} Committed: https://crrev.com/84d781133725f4170c0c21a99da1f35c9e17ca5d Cr-Commit-Position: refs/heads/master@{#365229} Committed: https://crrev.com/ed81e1bf7e1424c3470d164c73339936141f1f06 Cr-Commit-Position: refs/heads/master@{#365760}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Total comments: 7

Patch Set 3 : #

Total comments: 10

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 9

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Patch Set 9 : #

Total comments: 12

Patch Set 10 : #

Patch Set 11 : #

Total comments: 6

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : Fix a uaf #

Patch Set 15 : #

Patch Set 16 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+976 lines, -57 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/response-stream-construction.html View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/serviceworker/response-stream-construction-base-https-other-https.html View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/window/response-stream-construction.html View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/window/response-stream-construction-base-https-other-https.html View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/workers/response-stream-construction.html View 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/fetch/workers/response-stream-construction-base-https-other-https.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8RecursionScope.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +48 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +289 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandleTest.cpp View 1 chunk +441 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Request.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Request.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Response.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Response.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +42 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/modules/fetch/Response.idl View 1 chunk +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 66 (28 generated)
yhirano
PTAL tyoshino@: modules/fetch/ and layout tests bashi@: bindings/
5 years ago (2015-12-09 03:24:41 UTC) #8
bashi
https://codereview.chromium.org/1506023003/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode33 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:33: *done = doneValue->ToBoolean()->Value(); ToBoolean() is deprecated. We should use ...
5 years ago (2015-12-09 03:49:21 UTC) #10
yhirano
https://codereview.chromium.org/1506023003/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/60001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode33 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:33: *done = doneValue->ToBoolean()->Value(); On 2015/12/09 03:49:21, bashi1 wrote: > ...
5 years ago (2015-12-09 04:12:49 UTC) #12
bashi
https://codereview.chromium.org/1506023003/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode24 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:24: V8ThrowException::throwTypeError(scriptState->isolate(), "The iteration item is not an object."); nit: ...
5 years ago (2015-12-09 04:41:47 UTC) #13
yhirano
https://codereview.chromium.org/1506023003/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode24 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:24: V8ThrowException::throwTypeError(scriptState->isolate(), "The iteration item is not an object."); On ...
5 years ago (2015-12-09 06:13:26 UTC) #14
bashi
LGTM https://codereview.chromium.org/1506023003/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/100001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode34 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:34: return v8::MaybeLocal<v8::Value>(); On 2015/12/09 06:13:26, yhirano wrote: > ...
5 years ago (2015-12-09 07:06:37 UTC) #15
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1506023003/diff/120001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1506023003/diff/120001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode20 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:20: #include "public/platform/WebTraceLocation.h" add wtf/Assertions.h https://codereview.chromium.org/1506023003/diff/120001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode243 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:243: // JavaScript object. ...
5 years ago (2015-12-09 08:54:27 UTC) #16
yhirano
PS4 inserted V8RecursionScope to address assertion failures. https://codereview.chromium.org/1506023003/diff/120001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1506023003/diff/120001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode20 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:20: #include "public/platform/WebTraceLocation.h" ...
5 years ago (2015-12-09 10:54:10 UTC) #17
domenic
https://codereview.chromium.org/1506023003/diff/180001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js (right): https://codereview.chromium.org/1506023003/diff/180001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js#newcode8 third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js:8: function read_until_end(reader) { You could probably reuse the helper ...
5 years ago (2015-12-09 13:03:18 UTC) #19
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1506023003/diff/200001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1506023003/diff/200001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode248 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:248: TrackExceptionState es; please write the reason you can ignore ...
5 years ago (2015-12-10 10:49:51 UTC) #20
yhirano
https://codereview.chromium.org/1506023003/diff/180001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js (right): https://codereview.chromium.org/1506023003/diff/180001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js#newcode8 third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js:8: function read_until_end(reader) { On 2015/12/09 13:03:18, domenic wrote: > ...
5 years ago (2015-12-10 10:51:05 UTC) #21
yhirano
https://codereview.chromium.org/1506023003/diff/200001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1506023003/diff/200001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode248 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:248: TrackExceptionState es; On 2015/12/10 10:49:51, tyoshino wrote: > please ...
5 years ago (2015-12-10 11:18:10 UTC) #22
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/1506023003/diff/180001/third_party/WebKit/LayoutTests/http/tests/fetch/window/response-stream-construction-base-https-other-https.html File third_party/WebKit/LayoutTests/http/tests/fetch/window/response-stream-construction-base-https-other-https.html (right): https://codereview.chromium.org/1506023003/diff/180001/third_party/WebKit/LayoutTests/http/tests/fetch/window/response-stream-construction-base-https-other-https.html#newcode15 third_party/WebKit/LayoutTests/http/tests/fetch/window/response-stream-construction-base-https-other-https.html:15: script.src = '../script-tests/response-stream-construction.js?-base-https-other-https'; is -other-https necessary? https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js File ...
5 years ago (2015-12-10 13:49:37 UTC) #23
haraken
https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode21 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:21: v8::MaybeLocal<v8::Value> v8IterationItemUnpack(ScriptState* scriptState, v8::Local<v8::Object> item, bool* done) I don't ...
5 years ago (2015-12-10 14:24:35 UTC) #25
yhirano
haraken@, can you take a look at platform/ changes as well? https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js File third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response-stream-construction.js (right): ...
5 years ago (2015-12-11 03:27:18 UTC) #26
yhirano
https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.h File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.h (right): https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.h#newcode19 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.h:19: CORE_EXPORT v8::MaybeLocal<v8::Value> v8IterationItemUnpack(ScriptState*, v8::Local<v8::Object> item, bool* done); On 2015/12/11 ...
5 years ago (2015-12-11 03:42:56 UTC) #27
bashi
https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp File third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp (right): https://codereview.chromium.org/1506023003/diff/240001/third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp#newcode21 third_party/WebKit/Source/bindings/core/v8/V8IteratorResultValue.cpp:21: v8::MaybeLocal<v8::Value> v8IterationItemUnpack(ScriptState* scriptState, v8::Local<v8::Object> item, bool* done) On 2015/12/11 ...
5 years ago (2015-12-11 04:03:20 UTC) #28
haraken
bindings/ and platform/ LGTM
5 years ago (2015-12-11 04:17:52 UTC) #29
yhirano
Domenic, do you have any other comments?
5 years ago (2015-12-14 01:29:22 UTC) #30
domenic
LGTM with potential nits or things you could work on in a follow-up. Very excited! ...
5 years ago (2015-12-14 02:18:02 UTC) #31
yhirano
https://codereview.chromium.org/1506023003/diff/280001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp File third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp (right): https://codereview.chromium.org/1506023003/diff/280001/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp#newcode50 third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp:50: if (!item->IsObject() || !v8Call(v8UnpackIteratorResult(v.scriptState(), item.As<v8::Object>(), &done), value)) { On ...
5 years ago (2015-12-14 03:42:54 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506023003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506023003/320001
5 years ago (2015-12-14 03:43:11 UTC) #35
commit-bot: I haz the power
Committed patchset #13 (id:320001)
5 years ago (2015-12-14 05:43:07 UTC) #37
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/6aa006ba0f0f8a60c20167ad009f5699e40b8ef2 Cr-Commit-Position: refs/heads/master@{#364968}
5 years ago (2015-12-14 05:44:08 UTC) #39
sof
A revert of this CL (patchset #13 id:320001) has been created in https://codereview.chromium.org/1527493002/ by sigbjornf@opera.com. ...
5 years ago (2015-12-14 07:38:26 UTC) #40
yhirano
On 2015/12/14 07:38:26, sof wrote: > A revert of this CL (patchset #13 id:320001) has ...
5 years ago (2015-12-14 08:10:56 UTC) #42
yhirano
I thought bind protects a RefCounted pointer by creating a RefPtr, but it was wrong. ...
5 years ago (2015-12-14 11:06:53 UTC) #43
tyoshino (SeeGerritForStatus)
On 2015/12/14 11:06:53, yhirano wrote: > I thought bind protects a RefCounted pointer by creating ...
5 years ago (2015-12-15 08:56:52 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506023003/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506023003/340001
5 years ago (2015-12-15 08:58:43 UTC) #47
commit-bot: I haz the power
Committed patchset #14 (id:340001)
5 years ago (2015-12-15 12:04:39 UTC) #49
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/84d781133725f4170c0c21a99da1f35c9e17ca5d Cr-Commit-Position: refs/heads/master@{#365229}
5 years ago (2015-12-15 12:05:30 UTC) #51
Yuta Kitamura
A revert of this CL (patchset #14 id:340001) has been created in https://codereview.chromium.org/1528183004/ by yutak@chromium.org. ...
5 years ago (2015-12-16 03:42:41 UTC) #52
yhirano
On 2015/12/16 03:42:41, Yuta Kitamura wrote: > A revert of this CL (patchset #14 id:340001) ...
5 years ago (2015-12-16 05:13:51 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506023003/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506023003/360001
5 years ago (2015-12-16 05:15:33 UTC) #57
yhirano
On 2015/12/16 05:13:51, yhirano wrote: > On 2015/12/16 03:42:41, Yuta Kitamura wrote: > > A ...
5 years ago (2015-12-17 02:24:26 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506023003/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506023003/380001
5 years ago (2015-12-17 02:35:47 UTC) #62
commit-bot: I haz the power
Committed patchset #16 (id:380001)
5 years ago (2015-12-17 05:33:37 UTC) #64
commit-bot: I haz the power
5 years ago (2015-12-17 05:34:20 UTC) #66
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/ed81e1bf7e1424c3470d164c73339936141f1f06
Cr-Commit-Position: refs/heads/master@{#365760}

Powered by Google App Engine
This is Rietveld 408576698