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

Issue 23444058: Use downloadToFile option when XHR downloads a Blob (Closed)

Created:
7 years, 3 months ago by yusukesuzuki
Modified:
7 years ago
CC:
blink-reviews, caseq+blink_chromium.org, Nate Chapin, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org, do-not-use
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Use downloadToFile option when XHR downloads a Blob Leveraging downloadToFile when XHR downloads a Blob. As a result, a Blob is downloaded in the browser. It eliminates unnecessary memory copies between the renderer and the browser. When downloadToFile options is specified, didDownloadData is called instead of didReceiveData. So not to break the Inspector, we add the inspector instrumentations to it. BUG=269055 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=163141

Patch Set 1 : #

Total comments: 7

Patch Set 2 : Add LayoutTests expected file for Linux #

Total comments: 9

Patch Set 3 : #

Total comments: 2

Patch Set 4 : Reuse InspectorInstrumentation::didReceiveData #

Total comments: 18

Patch Set 5 : #

Total comments: 7

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Total comments: 5

Patch Set 8 : Rebase #

Total comments: 5

Patch Set 9 : Rebase #

Patch Set 10 : Rebase test style and XHR #

Unified diffs Side-by-side diffs Delta from patch set Stats (+625 lines, -56 lines) Patch
M LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob.html View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -1 line 0 comments Download
M LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob-expected.txt View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
A LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob-expected.txt View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector/timeline-xhr-event.html View 1 2 3 4 5 6 1 chunk +46 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector/timeline-xhr-event-expected.txt View 1 chunk +58 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector/timeline-xhr-response-type-blob-event.html View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/inspector/timeline-xhr-response-type-blob-event-expected.txt View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-get-response-type-blob.html View 1 2 3 4 5 6 2 chunks +13 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/cross-origin-preflight-get-response-type-blob-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent.html View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html View 1 2 3 4 5 6 2 chunks +3 lines, -8 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/resources/xmlhttprequest-response-type-blob.js View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/resources/xmlhttprequest-response-type-blob.js View 1 2 3 4 5 6 7 8 9 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/resources/xmlhttprequest-response-type-blob-sync.js View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/shared-worker-response-type-blob.html View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/shared-worker-response-type-blob-expected.txt View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/shared-worker-response-type-blob-sync.html View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/shared-worker-response-type-blob-sync-expected.txt View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/xmlhttprequest-response-type-blob.html View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/xmlhttprequest-response-type-blob-expected.txt View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/xmlhttprequest-response-type-blob-sync.html View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/workers/xmlhttprequest-response-type-blob-sync-expected.txt View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress-response-type-blob.html View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress-response-type-blob-expected.txt View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-response-type-blob.html View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-response-type-blob-expected.txt View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/platform/linux/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress-response-type-blob-expected.txt View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/platform/win/http/tests/xmlhttprequest/xmlhttprequest-no-content-length-onProgress-response-type-blob-expected.txt View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/fetch/FetchContext.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/FetchContext.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceLoader.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceLoaderHost.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/loader/FrameFetchContext.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/loader/WorkerThreadableLoader.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/loader/WorkerThreadableLoader.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/xml/XMLHttpRequest.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
M Source/core/xml/XMLHttpRequest.cpp View 1 2 3 4 5 6 7 8 9 8 chunks +64 lines, -29 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
yusukesuzuki
https://codereview.chromium.org/23444058/diff/29001/LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob-expected.txt File LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob-expected.txt (right): https://codereview.chromium.org/23444058/diff/29001/LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob-expected.txt#newcode8 LayoutTests/http/tests/inspector/network/network-xhr-async-response-type-blob-expected.txt:8: resource.content after requesting content: null The requestContent result for ...
7 years, 3 months ago (2013-09-19 04:23:36 UTC) #1
eustas
https://codereview.chromium.org/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl File Source/core/inspector/InspectorInstrumentation.idl (right): https://codereview.chromium.org/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl#newcode286 Source/core/inspector/InspectorInstrumentation.idl:286: void didReceiveDataWithoutData(Frame*, unsigned long identifier, int dataLength, int encodedDataLength); ...
7 years, 3 months ago (2013-09-19 04:52:37 UTC) #2
yusukesuzuki
https://codereview.chromium.org/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl File Source/core/inspector/InspectorInstrumentation.idl (right): https://codereview.chromium.org/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl#newcode286 Source/core/inspector/InspectorInstrumentation.idl:286: void didReceiveDataWithoutData(Frame*, unsigned long identifier, int dataLength, int encodedDataLength); ...
7 years, 3 months ago (2013-09-19 05:13:58 UTC) #3
yusukesuzuki
https://codereview.chromium.org/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl File Source/core/inspector/InspectorInstrumentation.idl (right): https://codereview.chromium.org/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl#newcode286 Source/core/inspector/InspectorInstrumentation.idl:286: void didReceiveDataWithoutData(Frame*, unsigned long identifier, int dataLength, int encodedDataLength); ...
7 years, 3 months ago (2013-09-19 05:33:06 UTC) #4
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/23444058/diff/38001/Source/core/loader/FrameFetchContext.h File Source/core/loader/FrameFetchContext.h (right): https://codereview.chromium.org/23444058/diff/38001/Source/core/loader/FrameFetchContext.h#newcode60 Source/core/loader/FrameFetchContext.h:60: virtual void dispatchDidDownloadData(DocumentLoader*, unsigned long identifier, int dataLength, int ...
7 years, 3 months ago (2013-09-19 06:58:45 UTC) #5
yusukesuzuki
https://codereview.chromium.org/23444058/diff/38001/Source/core/loader/FrameFetchContext.h File Source/core/loader/FrameFetchContext.h (right): https://codereview.chromium.org/23444058/diff/38001/Source/core/loader/FrameFetchContext.h#newcode60 Source/core/loader/FrameFetchContext.h:60: virtual void dispatchDidDownloadData(DocumentLoader*, unsigned long identifier, int dataLength, int ...
7 years, 3 months ago (2013-09-19 07:19:06 UTC) #6
yusukesuzuki
https://codereview.chromium.org/23444058/diff/45001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/23444058/diff/45001/Source/core/xml/XMLHttpRequest.cpp#newcode770 Source/core/xml/XMLHttpRequest.cpp:770: // we redirect the downloaded data to a file-handle ...
7 years, 3 months ago (2013-09-19 07:34:33 UTC) #7
eustas
> Since didDownloadData always has no data, I think that clarifying it by function > ...
7 years, 3 months ago (2013-09-19 08:28:41 UTC) #8
yusukesuzuki
On 2013/09/19 08:28:41, eustas.ru wrote: > I think that calling this method with null clearly ...
7 years, 3 months ago (2013-09-19 15:24:44 UTC) #9
yusukesuzuki
https://chromiumcodereview.appspot.com/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl File Source/core/inspector/InspectorInstrumentation.idl (right): https://chromiumcodereview.appspot.com/23444058/diff/29001/Source/core/inspector/InspectorInstrumentation.idl#newcode286 Source/core/inspector/InspectorInstrumentation.idl:286: void didReceiveDataWithoutData(Frame*, unsigned long identifier, int dataLength, int encodedDataLength); ...
7 years, 3 months ago (2013-09-19 15:41:20 UTC) #10
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/23444058/diff/64001/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html File LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html (right): https://codereview.chromium.org/23444058/diff/64001/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html#newcode32 LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html:32: } this is not used (original file doesn't ...
7 years, 3 months ago (2013-09-24 10:28:30 UTC) #11
yusukesuzuki
https://codereview.chromium.org/23444058/diff/64001/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html File LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html (right): https://codereview.chromium.org/23444058/diff/64001/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html#newcode32 LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob.html:32: } On 2013/09/24 10:28:31, tyoshino wrote: > this is ...
7 years, 3 months ago (2013-09-24 11:13:35 UTC) #12
vsevik
Adding caseq@ for inspector/timeline tests. https://codereview.chromium.org/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html File LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html (right): https://codereview.chromium.org/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html#newcode1 LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html:1: <html> I would remove ...
7 years, 3 months ago (2013-09-24 13:43:17 UTC) #13
yusukesuzuki
Thanks for your review. https://chromiumcodereview.appspot.com/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html File LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html (right): https://chromiumcodereview.appspot.com/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html#newcode1 LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html:1: <html> On 2013/09/24 13:43:17, vsevik ...
7 years, 3 months ago (2013-09-25 01:43:04 UTC) #14
vsevik
On 2013/09/25 01:43:04, yusukesuzuki wrote: > Thanks for your review. > > https://chromiumcodereview.appspot.com/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-data-received-async-response-type-blob.html > File ...
7 years, 2 months ago (2013-09-25 15:26:02 UTC) #15
caseq
https://chromiumcodereview.appspot.com/23444058/diff/104001/LayoutTests/http/tests/inspector/timeline-xhr-response-type-blob-event.html File LayoutTests/http/tests/inspector/timeline-xhr-response-type-blob-event.html (right): https://chromiumcodereview.appspot.com/23444058/diff/104001/LayoutTests/http/tests/inspector/timeline-xhr-response-type-blob-event.html#newcode11 LayoutTests/http/tests/inspector/timeline-xhr-response-type-blob-event.html:11: xhr.responseType = 'blob'; nit: we use double quotes on ...
7 years, 2 months ago (2013-09-25 15:33:30 UTC) #16
yusukesuzuki
https://chromiumcodereview.appspot.com/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-response-received-async-response-type-blob.html File LayoutTests/http/tests/inspector/network/network-xhr-response-received-async-response-type-blob.html (right): https://chromiumcodereview.appspot.com/23444058/diff/99001/LayoutTests/http/tests/inspector/network/network-xhr-response-received-async-response-type-blob.html#newcode1 LayoutTests/http/tests/inspector/network/network-xhr-response-received-async-response-type-blob.html:1: <html> On 2013/09/25 01:43:05, yusukesuzuki wrote: > On 2013/09/24 ...
7 years, 2 months ago (2013-09-25 16:26:15 UTC) #17
vsevik
inspector lgtm
7 years, 2 months ago (2013-10-01 15:00:30 UTC) #18
yusukesuzuki
Hi abarth@, can you take a look at this CL? This patch introduces didDownloadData(int) path ...
7 years, 2 months ago (2013-10-12 06:52:43 UTC) #19
abarth-chromium
japhet should really review this CL instead of me. https://codereview.chromium.org/23444058/diff/131001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/23444058/diff/131001/Source/core/xml/XMLHttpRequest.cpp#newcode409 Source/core/xml/XMLHttpRequest.cpp:409: ...
7 years, 2 months ago (2013-10-13 05:20:29 UTC) #20
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/23444058/diff/131001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/23444058/diff/131001/Source/core/xml/XMLHttpRequest.cpp#newcode423 Source/core/xml/XMLHttpRequest.cpp:423: // Firefox calls readyStateChanged every time it receives data, ...
7 years, 2 months ago (2013-10-16 07:57:55 UTC) #21
pfeldman
Is this forgotten?
7 years, 2 months ago (2013-10-24 13:58:07 UTC) #22
yusukesuzuki
Sorry for my late reply. I'll rebase it and fix the code pointed by reviewers.
7 years, 2 months ago (2013-10-24 13:59:21 UTC) #23
yusukesuzuki
Sorry for my very late fix. Now I've rebased the patch and fixed the issues ...
7 years, 2 months ago (2013-10-24 15:22:40 UTC) #24
yusukesuzuki
Hi abarth@ and japhet@, could you take a look?
7 years, 1 month ago (2013-11-05 03:10:04 UTC) #25
abarth-chromium
LGTM https://codereview.chromium.org/23444058/diff/209001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/23444058/diff/209001/Source/core/xml/XMLHttpRequest.cpp#newcode293 Source/core/xml/XMLHttpRequest.cpp:293: const String& filePath = m_response.downloadedFilePath(); const String& -> ...
7 years, 1 month ago (2013-11-05 07:01:50 UTC) #26
yusukesuzuki
https://codereview.chromium.org/23444058/diff/209001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/23444058/diff/209001/Source/core/xml/XMLHttpRequest.cpp#newcode293 Source/core/xml/XMLHttpRequest.cpp:293: const String& filePath = m_response.downloadedFilePath(); On 2013/11/05 07:01:51, abarth ...
7 years, 1 month ago (2013-11-05 11:03:59 UTC) #27
michaeln
wooohoooo :)
7 years, 1 month ago (2013-11-05 19:37:55 UTC) #28
yusukesuzuki
Hi japhet@, could you take a look? This change contains loader / fetch changes. So ...
7 years, 1 month ago (2013-11-06 01:57:00 UTC) #29
vsevik
On 2013/11/06 01:57:00, yusukesuzuki wrote: > Hi japhet@, could you take a look? > This ...
7 years ago (2013-12-03 19:59:54 UTC) #30
Nate Chapin
loader and fetch changes LGTM In the future, feel free to ping me on IRC ...
7 years ago (2013-12-03 20:05:53 UTC) #31
yusukesuzuki
On 2013/12/03 20:05:53, Nate Chapin wrote: > loader and fetch changes LGTM > > In ...
7 years ago (2013-12-03 20:08:56 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusukesuzuki@chromium.org/23444058/519001
7 years ago (2013-12-04 01:33:23 UTC) #33
commit-bot: I haz the power
7 years ago (2013-12-04 03:21:35 UTC) #34
Message was sent while issue was closed.
Change committed as 163141

Powered by Google App Engine
This is Rietveld 408576698