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

Issue 2633123002: [Mojo-Loading] OnStartLoadingResponseBody should be called after OnReceiveResponse (Closed)

Created:
3 years, 11 months ago by yhirano
Modified:
3 years, 11 months ago
Reviewers:
kinuko, jam, dcheng, mmenke, tzik
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, Randy Smith (Not in Mondays), yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, loading-reviews_chromium.org, darin (slow to review), mmenke, horo
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo-Loading] OnStartLoadingResponseBody should be called after OnReceiveResponse In content::ResourceHandler, OnWillRead can be called before OnResponseStarted. MojoAsyncResourceHandler calls OnStartLoadingResponseBody when OnResponseStarted is called, and that means OnStartLoadingResponseBody can be called before OnReceiveResponse. That complicates clients' code. With this CL, it is guaranteed that URLLoaderClient::OnStartLoadingResponseBody is called after URLLoaderClient::OnReceiveResponse. BUG=603396 Review-Url: https://codereview.chromium.org/2633123002 Cr-Commit-Position: refs/heads/master@{#444638} Committed: https://chromium.googlesource.com/chromium/src/+/246883ff6add126d1f6482fe5f883a2d6a2b2525

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 8

Patch Set 3 : rebase & fix #

Patch Set 4 : fix #

Patch Set 5 : fix #

Total comments: 5

Patch Set 6 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -142 lines) Patch
M content/browser/loader/mojo_async_resource_handler.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/loader/mojo_async_resource_handler.cc View 1 2 3 4 5 3 chunks +10 lines, -5 lines 0 comments Download
M content/browser/loader/mojo_async_resource_handler_unittest.cc View 1 2 3 4 15 chunks +29 lines, -51 lines 0 comments Download
M content/browser/loader/test_url_loader_client.cc View 1 2 3 4 5 chunks +12 lines, -0 lines 0 comments Download
M content/browser/loader/url_loader_factory_impl_unittest.cc View 1 2 3 2 chunks +3 lines, -5 lines 0 comments Download
M content/child/url_loader_client_impl.cc View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M content/child/url_loader_client_impl_unittest.cc View 1 2 4 chunks +2 lines, -62 lines 0 comments Download
M content/child/url_response_body_consumer.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/child/url_response_body_consumer.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M content/child/url_response_body_consumer_unittest.cc View 4 chunks +0 lines, -4 lines 0 comments Download
M content/common/url_loader.mojom View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 41 (29 generated)
yhirano
3 years, 11 months ago (2017-01-16 10:41:46 UTC) #8
tzik
lgtm
3 years, 11 months ago (2017-01-17 12:52:03 UTC) #11
yhirano
+dcheng@ for content/common/url_loader.mojom +mmenke@ for content/browser/loader +jam@ for content/child
3 years, 11 months ago (2017-01-17 13:15:52 UTC) #13
mmenke
https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc File content/browser/loader/mojo_async_resource_handler.cc (right): https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc#newcode188 content/browser/loader/mojo_async_resource_handler.cc:188: std::move(data_pipe_consumer_handle_)); std::move leaves the original unique_ptr pointer in an ...
3 years, 11 months ago (2017-01-17 16:13:57 UTC) #15
Randy Smith (Not in Mondays)
https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc File content/browser/loader/mojo_async_resource_handler.cc (right): https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc#newcode217 content/browser/loader/mojo_async_resource_handler.cc:217: std::move(data_pipe.consumer_handle)); On 2017/01/17 16:13:57, mmenke wrote: > Is there ...
3 years, 11 months ago (2017-01-17 16:45:11 UTC) #17
dcheng
comment-only mojo changes lgtm https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc File content/browser/loader/mojo_async_resource_handler.cc (right): https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc#newcode188 content/browser/loader/mojo_async_resource_handler.cc:188: std::move(data_pipe_consumer_handle_)); On 2017/01/17 16:13:57, mmenke ...
3 years, 11 months ago (2017-01-17 23:20:18 UTC) #19
kinuko
content/child lgtm
3 years, 11 months ago (2017-01-18 01:17:11 UTC) #21
yhirano
https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc File content/browser/loader/mojo_async_resource_handler.cc (right): https://codereview.chromium.org/2633123002/diff/20001/content/browser/loader/mojo_async_resource_handler.cc#newcode188 content/browser/loader/mojo_async_resource_handler.cc:188: std::move(data_pipe_consumer_handle_)); On 2017/01/17 16:13:57, mmenke wrote: > std::move leaves ...
3 years, 11 months ago (2017-01-18 09:10:45 UTC) #28
mmenke
LGTM as-is, but a couple comments/questions. https://codereview.chromium.org/2633123002/diff/80001/content/browser/loader/mojo_async_resource_handler.cc File content/browser/loader/mojo_async_resource_handler.cc (right): https://codereview.chromium.org/2633123002/diff/80001/content/browser/loader/mojo_async_resource_handler.cc#newcode216 content/browser/loader/mojo_async_resource_handler.cc:216: !data_pipe.consumer_handle.is_valid()) { Random ...
3 years, 11 months ago (2017-01-18 16:26:12 UTC) #31
yhirano
https://codereview.chromium.org/2633123002/diff/80001/content/browser/loader/mojo_async_resource_handler.cc File content/browser/loader/mojo_async_resource_handler.cc (right): https://codereview.chromium.org/2633123002/diff/80001/content/browser/loader/mojo_async_resource_handler.cc#newcode216 content/browser/loader/mojo_async_resource_handler.cc:216: !data_pipe.consumer_handle.is_valid()) { On 2017/01/18 16:26:12, mmenke wrote: > Random ...
3 years, 11 months ago (2017-01-19 03:25:50 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2633123002/100001
3 years, 11 months ago (2017-01-19 03:26:27 UTC) #38
commit-bot: I haz the power
3 years, 11 months ago (2017-01-19 04:19:51 UTC) #41
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/246883ff6add126d1f6482fe5f88...

Powered by Google App Engine
This is Rietveld 408576698