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

Issue 2363963002: Make WebDataConsumerHandleImpl return OK while zero-length reading of closed pipe. (Closed)

Created:
4 years, 3 months ago by horo
Modified:
4 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make WebDataConsumerHandleImpl return OK while zero-length reading of closed pipe. Even if there is unread data available, mojo::ReadDataRaw() returns FAILED_PRECONDITION when |size| is 0 and the producer handle was closed. But in this case, WebDataConsumerHandle::Reader::read() must return OK. BytesConsumerForDataConsumerHandle::didGetReadable() calls zero-length read to check the handle's status. If ReaderImpl::read() returns Done, the consumer handle will be closed even if there is unread data available. BUG=649558 Committed: https://crrev.com/21cb200fb6ef1ea455ac5a2e820a1ed4fcdea5e5 Cr-Commit-Position: refs/heads/master@{#421706}

Patch Set 1 #

Total comments: 4

Patch Set 2 : use constexpr #

Patch Set 3 : use mojo::Wait() with 0 deadline to check whether readable or not #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -1 line) Patch
M content/child/web_data_consumer_handle_impl.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M content/child/web_data_consumer_handle_impl_unittest.cc View 1 2 chunks +27 lines, -1 line 0 comments Download

Messages

Total messages: 45 (27 generated)
horo
yhirano@ Could you please review this?
4 years, 3 months ago (2016-09-23 05:53:57 UTC) #7
yhirano
lgtm https://codereview.chromium.org/2363963002/diff/1/content/child/web_data_consumer_handle_impl_unittest.cc File content/child/web_data_consumer_handle_impl_unittest.cc (right): https://codereview.chromium.org/2363963002/diff/1/content/child/web_data_consumer_handle_impl_unittest.cc#newcode203 content/child/web_data_consumer_handle_impl_unittest.cc:203: static int kDataPipeCapacity; + constexpr https://codereview.chromium.org/2363963002/diff/1/content/child/web_data_consumer_handle_impl_unittest.cc#newcode285 content/child/web_data_consumer_handle_impl_unittest.cc:285: const ...
4 years, 3 months ago (2016-09-23 06:55:55 UTC) #8
horo
Thank you. https://codereview.chromium.org/2363963002/diff/1/content/child/web_data_consumer_handle_impl_unittest.cc File content/child/web_data_consumer_handle_impl_unittest.cc (right): https://codereview.chromium.org/2363963002/diff/1/content/child/web_data_consumer_handle_impl_unittest.cc#newcode203 content/child/web_data_consumer_handle_impl_unittest.cc:203: static int kDataPipeCapacity; On 2016/09/23 06:55:55, yhirano ...
4 years, 3 months ago (2016-09-23 07:38:37 UTC) #11
horo
esprehn@ Could you please review this?
4 years, 3 months ago (2016-09-23 07:40:54 UTC) #13
horo
On 2016/09/23 07:40:54, horo wrote: > esprehn@ > > Could you please review this? Ping?
4 years, 2 months ago (2016-09-28 00:04:35 UTC) #16
esprehn
rockot@ might be a better reviewer? I'm happy to stamp after.
4 years, 2 months ago (2016-09-28 04:04:14 UTC) #18
Ken Rockot(use gerrit already)
If you want to test for peer closure without it feeling like a hack, you ...
4 years, 2 months ago (2016-09-28 05:34:12 UTC) #19
horo
On 2016/09/28 05:34:12, Ken Rockot wrote: > If you want to test for peer closure ...
4 years, 2 months ago (2016-09-28 08:16:53 UTC) #21
Ken Rockot(use gerrit already)
lgtm
4 years, 2 months ago (2016-09-28 13:18:29 UTC) #22
horo
On 2016/09/28 13:18:29, Ken Rockot wrote: > lgtm Thank you.
4 years, 2 months ago (2016-09-28 14:01:39 UTC) #23
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/2363963002/40001
4 years, 2 months ago (2016-09-29 00:22:21 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/269123)
4 years, 2 months ago (2016-09-29 00:30:51 UTC) #35
horo
+esprehn@ Please :)
4 years, 2 months ago (2016-09-29 01:06:28 UTC) #37
esprehn
lgtm
4 years, 2 months ago (2016-09-29 01:17:30 UTC) #38
horo
On 2016/09/29 01:17:30, esprehn wrote: > lgtm thank you!
4 years, 2 months ago (2016-09-29 01:23:48 UTC) #39
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/2363963002/40001
4 years, 2 months ago (2016-09-29 01:24:28 UTC) #41
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-09-29 01:38:53 UTC) #43
commit-bot: I haz the power
4 years, 2 months ago (2016-09-29 01:42:22 UTC) #45
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/21cb200fb6ef1ea455ac5a2e820a1ed4fcdea5e5
Cr-Commit-Position: refs/heads/master@{#421706}

Powered by Google App Engine
This is Rietveld 408576698