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

Issue 555443002: [Fetch API] Put body members directly on Response/Request (Closed)

Created:
6 years, 3 months ago by horo
Modified:
6 years, 3 months ago
Reviewers:
tkent, jsbell, yhirano
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[Fetch API] Put body members directly on Response/Request http://fetch.spec.whatwg.org/ https://github.com/whatwg/fetch/commit/a898f9a2941350aa625aa79b24673628ac2b2a8e Request.body and Response.body is removed from the spec. Body interface is introduced. interface Body { readonly attribute boolean bodyUsed; Promise<ArrayBuffer> arrayBuffer(); Promise<Blob> blob(); Promise<FormData> formData(); Promise<JSON> json(); Promise<ScalarValueString> text(); }; Request implements Body; Response implements Body; BUG=411743, 410197, 410196 TEST=http/tests/serviceworker/ http/tests/local/serviceworker/ Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181793

Patch Set 1 : #

Total comments: 16

Patch Set 2 : incorporated yhirano and jsbell's comment #

Total comments: 10

Patch Set 3 : incorporated yhirano's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -623 lines) Patch
M LayoutTests/http/tests/local/serviceworker/resources/fetch-request-body-file-worker.js View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/fetch-access-control.html View 1 chunk +7 lines, -3 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/fetch-body-mixin.html View 2 chunks +2 lines, -2 lines 0 comments Download
D LayoutTests/http/tests/serviceworker/fetch-body-stream.html View 1 chunk +0 lines, -42 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js View 1 2 1 chunk +20 lines, -7 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/resources/fetch-body-mixin-worker.js View 6 chunks +7 lines, -7 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-body-stream-worker.js View 1 chunk +0 lines, -94 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-event-test-worker.js View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-worker.js View 1 chunk +1 line, -9 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-worker.js View 5 chunks +5 lines, -5 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/request-worker.js View 1 2 6 chunks +9 lines, -5 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/response-content-worker.js View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
A + Source/modules/serviceworkers/Body.h View 1 4 chunks +17 lines, -15 lines 0 comments Download
A + Source/modules/serviceworkers/Body.cpp View 1 2 6 chunks +37 lines, -41 lines 0 comments Download
A + Source/modules/serviceworkers/Body.idl View 1 chunk +8 lines, -8 lines 0 comments Download
D Source/modules/serviceworkers/FetchBodyStream.h View 1 chunk +0 lines, -71 lines 0 comments Download
D Source/modules/serviceworkers/FetchBodyStream.cpp View 1 chunk +0 lines, -186 lines 0 comments Download
D Source/modules/serviceworkers/FetchBodyStream.idl View 1 chunk +0 lines, -21 lines 0 comments Download
M Source/modules/serviceworkers/FetchManager.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/Request.h View 3 chunks +10 lines, -9 lines 0 comments Download
M Source/modules/serviceworkers/Request.cpp View 7 chunks +30 lines, -29 lines 0 comments Download
M Source/modules/serviceworkers/Request.idl View 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/RequestTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/Response.h View 1 2 3 chunks +16 lines, -16 lines 0 comments Download
M Source/modules/serviceworkers/Response.cpp View 1 2 6 chunks +37 lines, -34 lines 0 comments Download
M Source/modules/serviceworkers/Response.idl View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/ResponseTest.cpp View 3 chunks +21 lines, -4 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (12 generated)
horo
yhirano@ Could you please review this?
6 years, 3 months ago (2014-09-09 03:26:36 UTC) #10
yhirano
https://codereview.chromium.org/555443002/diff/130026/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js File LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js (right): https://codereview.chromium.org/555443002/diff/130026/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js#newcode84 LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js:84: // Send the result to fetch-access-control.html. This handler "catch"es ...
6 years, 3 months ago (2014-09-09 09:31:49 UTC) #11
jsbell
Just some drive-by observations... https://codereview.chromium.org/555443002/diff/130026/Source/modules/serviceworkers/Body.h File Source/modules/serviceworkers/Body.h (right): https://codereview.chromium.org/555443002/diff/130026/Source/modules/serviceworkers/Body.h#newcode53 Source/modules/serviceworkers/Body.h:53: Body(ExecutionContext*); single arg constructor should ...
6 years, 3 months ago (2014-09-09 22:04:25 UTC) #13
horo
https://codereview.chromium.org/555443002/diff/130026/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js File LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js (right): https://codereview.chromium.org/555443002/diff/130026/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js#newcode84 LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js:84: // Send the result to fetch-access-control.html. On 2014/09/09 09:31:48, ...
6 years, 3 months ago (2014-09-10 06:18:44 UTC) #14
yhirano
https://codereview.chromium.org/555443002/diff/170001/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js File LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js (right): https://codereview.chromium.org/555443002/diff/170001/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js#newcode82 LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js:82: res.text() How about flattening then by doing something like ...
6 years, 3 months ago (2014-09-10 11:11:29 UTC) #15
horo
https://codereview.chromium.org/555443002/diff/170001/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js File LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js (right): https://codereview.chromium.org/555443002/diff/170001/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js#newcode82 LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js:82: res.text() On 2014/09/10 11:11:29, yhirano wrote: > How about ...
6 years, 3 months ago (2014-09-11 03:07:15 UTC) #16
horo
https://codereview.chromium.org/555443002/diff/170001/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js File LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js (right): https://codereview.chromium.org/555443002/diff/170001/LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js#newcode82 LayoutTests/http/tests/serviceworker/resources/fetch-access-control-worker.js:82: res.text() On 2014/09/10 11:11:29, yhirano wrote: > How about ...
6 years, 3 months ago (2014-09-11 03:07:15 UTC) #17
yhirano
lgtm
6 years, 3 months ago (2014-09-11 03:43:27 UTC) #18
horo
tkent@ Could you please review Source/web/ServiceWorkerGlobalScopeProxy.cpp?
6 years, 3 months ago (2014-09-11 03:47:26 UTC) #20
tkent
Source/web lgtm. IMO, the name 'Body' is too generic...
6 years, 3 months ago (2014-09-11 04:05:44 UTC) #21
horo
On 2014/09/11 04:05:44, tkent (overloaded) wrote: > Source/web lgtm. > > IMO, the name 'Body' ...
6 years, 3 months ago (2014-09-11 04:28:03 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/555443002/190001
6 years, 3 months ago (2014-09-11 04:28:30 UTC) #24
commit-bot: I haz the power
6 years, 3 months ago (2014-09-11 05:36:55 UTC) #25
Message was sent while issue was closed.
Committed patchset #3 (id:190001) as 181793

Powered by Google App Engine
This is Rietveld 408576698