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

Issue 786893004: [ServiceWorker] Use BodyStreamBuffer as the body data of the Response object. (Closed)

Created:
6 years ago by horo
Modified:
6 years ago
Reviewers:
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

[ServiceWorker] Use BodyStreamBuffer as the body data of the Response object. Currently we use BlobDataHandle as the body data of Request and Response object. BlobDataHandle can handle only static data. It can't handle progressive data. We will use BodyStreamBuffer for Response objects which will be created in FetchManager to support progressive loading. In current implementation when Response.clone() is called, FetchResponseData object will be shared between the responses. But this cl changes this behavior to "tee" the stream. Response.clone() will create two FetchResponseData with new BodyStreamBuffers, and StreamTeePump will pump up the data from original BodyStreamBuffer to the two new BodyStreamBuffers. This change depends on https://codereview.chromium.org/787793002/. BUG=436424 TEST=webkit_unit_tests --gtest_filter=ServiceWorkerResponseTest.* Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187114

Patch Set 1 : #

Total comments: 3

Patch Set 2 : introduced internalBlobDataHandle(), internalBuffer() and internalContentType() to Response and FetchResponseData #

Total comments: 6

Patch Set 3 : incorporated yhirano's comment #

Total comments: 17

Patch Set 4 : #

Patch Set 5 : add comment #

Total comments: 8

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+554 lines, -34 lines) Patch
M Source/modules/serviceworkers/Body.h View 1 2 3 4 4 chunks +15 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/Body.cpp View 1 2 3 7 chunks +71 lines, -9 lines 0 comments Download
M Source/modules/serviceworkers/FetchResponseData.h View 1 2 3 3 chunks +13 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/FetchResponseData.cpp View 1 2 3 8 chunks +141 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/Request.h View 1 2 3 4 chunks +6 lines, -3 lines 0 comments Download
M Source/modules/serviceworkers/Request.cpp View 1 2 3 3 chunks +20 lines, -3 lines 0 comments Download
M Source/modules/serviceworkers/Response.h View 1 2 3 4 chunks +14 lines, -8 lines 0 comments Download
M Source/modules/serviceworkers/Response.cpp View 1 2 3 4 chunks +42 lines, -8 lines 0 comments Download
M Source/modules/serviceworkers/ResponseTest.cpp View 1 2 3 4 5 3 chunks +232 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
horo
yhirano@ Could you please review this?
6 years ago (2014-12-09 15:07:42 UTC) #5
yhirano
https://codereview.chromium.org/786893004/diff/80001/Source/modules/serviceworkers/Body.h File Source/modules/serviceworkers/Body.h (right): https://codereview.chromium.org/786893004/diff/80001/Source/modules/serviceworkers/Body.h#newcode84 Source/modules/serviceworkers/Body.h:84: virtual PassRefPtr<BlobDataHandle> blobDataHandle(bool /* internal */) const = 0; ...
6 years ago (2014-12-11 03:55:47 UTC) #7
horo
https://codereview.chromium.org/786893004/diff/80001/Source/modules/serviceworkers/Body.h File Source/modules/serviceworkers/Body.h (right): https://codereview.chromium.org/786893004/diff/80001/Source/modules/serviceworkers/Body.h#newcode84 Source/modules/serviceworkers/Body.h:84: virtual PassRefPtr<BlobDataHandle> blobDataHandle(bool /* internal */) const = 0; ...
6 years ago (2014-12-11 05:43:08 UTC) #8
yhirano
Do you plan to maintain both two interfaces (Blob and BodyStreamBuffer) in Body? I think ...
6 years ago (2014-12-12 04:31:16 UTC) #9
horo
> Do you plan to maintain both two interfaces (Blob and BodyStreamBuffer) in Body? > ...
6 years ago (2014-12-12 05:30:47 UTC) #10
yhirano
I still think interacting with both two interfaces is not good. We should seek a ...
6 years ago (2014-12-12 12:42:33 UTC) #11
horo
https://codereview.chromium.org/786893004/diff/120001/Source/modules/serviceworkers/FetchRequestData.cpp File Source/modules/serviceworkers/FetchRequestData.cpp (right): https://codereview.chromium.org/786893004/diff/120001/Source/modules/serviceworkers/FetchRequestData.cpp#newcode71 Source/modules/serviceworkers/FetchRequestData.cpp:71: String FetchRequestData::contentType() const On 2014/12/12 12:42:33, yhirano wrote: > ...
6 years ago (2014-12-15 02:12:24 UTC) #12
horo
On 2014/12/12 12:42:33, yhirano wrote: > I still think interacting with both two interfaces is ...
6 years ago (2014-12-15 02:27:21 UTC) #13
yhirano
https://codereview.chromium.org/786893004/diff/120001/Source/modules/serviceworkers/ResponseTest.cpp File Source/modules/serviceworkers/ResponseTest.cpp (right): https://codereview.chromium.org/786893004/diff/120001/Source/modules/serviceworkers/ResponseTest.cpp#newcode261 Source/modules/serviceworkers/ResponseTest.cpp:261: void checkResponseStream(Response* response, BodyStreamBuffer* buffer, bool hasNonInternalStream) On 2014/12/15 ...
6 years ago (2014-12-15 04:03:06 UTC) #14
horo
https://codereview.chromium.org/786893004/diff/120001/Source/modules/serviceworkers/ResponseTest.cpp File Source/modules/serviceworkers/ResponseTest.cpp (right): https://codereview.chromium.org/786893004/diff/120001/Source/modules/serviceworkers/ResponseTest.cpp#newcode261 Source/modules/serviceworkers/ResponseTest.cpp:261: void checkResponseStream(Response* response, BodyStreamBuffer* buffer, bool hasNonInternalStream) On 2014/12/15 ...
6 years ago (2014-12-15 04:26:08 UTC) #15
yhirano
lgtm
6 years ago (2014-12-15 04:28:17 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/786893004/180001
6 years ago (2014-12-15 04:44:28 UTC) #18
commit-bot: I haz the power
6 years ago (2014-12-15 05:52:34 UTC) #19
Message was sent while issue was closed.
Committed patchset #6 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=187114

Powered by Google App Engine
This is Rietveld 408576698