4 years, 10 months ago
(2015-06-16 18:59:32 UTC)
#2
Patchset #6 (id:100001) has been deleted
hiroshige
Patchset #6 (id:120001) has been deleted
4 years, 10 months ago
(2015-06-16 18:59:42 UTC)
#3
Patchset #6 (id:120001) has been deleted
hiroshige
Patchset #6 (id:140001) has been deleted
4 years, 10 months ago
(2015-06-16 19:00:10 UTC)
#4
Patchset #6 (id:140001) has been deleted
hiroshige
PTAL.
4 years, 10 months ago
(2015-06-16 19:28:54 UTC)
#5
PTAL.
yhirano
https://codereview.chromium.org/1176243004/diff/180001/Source/modules/fetch/CompositeDataConsumerHandle.cpp File Source/modules/fetch/CompositeDataConsumerHandle.cpp (right): https://codereview.chromium.org/1176243004/diff/180001/Source/modules/fetch/CompositeDataConsumerHandle.cpp#newcode13 Source/modules/fetch/CompositeDataConsumerHandle.cpp:13: #include "wtf/Functional.h" You don't need this since bind is ...
4 years, 10 months ago
(2015-06-17 04:13:35 UTC)
#6
On 2015/06/17 09:36:35, yhirano wrote: > Looks good, but I have a question about FetchDataConsumerHandle.h ...
4 years, 10 months ago
(2015-06-17 10:55:31 UTC)
#11
On 2015/06/17 09:36:35, yhirano wrote:
> Looks good, but I have a question about FetchDataConsumerHandle.h interface at
> [1].
> One possible fix is to state that obtainBlobDataConsumerHandle will not return
a
> valid handle with size unset.
>
> 1:
>
https://codereview.chromium.org/1179393007/diff/80001/Source/modules/fetch/Fe...
Oh, I misunderstood the semantics of obtainBlobDataHandle();
I thought the data is still available via reader after obtainBlobDataHandle(),
but the reader should return Done after obtainBlobDataHandle(), right?
If so, name such as drainAsBlobDataHandle() might be better.
Also, maybe drainAsBlobDataHandle() should be a member of Handle (not reader)
and require that the handle is not locked when called, to avoid situation like
drainAsBlobDataHandle() is called during two-phase.
yhirano
On 2015/06/17 10:55:31, hiroshige wrote: > On 2015/06/17 09:36:35, yhirano wrote: > > Looks good, ...
4 years, 10 months ago
(2015-06-17 11:11:47 UTC)
#12
On 2015/06/17 10:55:31, hiroshige wrote:
> On 2015/06/17 09:36:35, yhirano wrote:
> > Looks good, but I have a question about FetchDataConsumerHandle.h interface
at
> > [1].
> > One possible fix is to state that obtainBlobDataConsumerHandle will not
return
> a
> > valid handle with size unset.
> >
> > 1:
> >
>
https://codereview.chromium.org/1179393007/diff/80001/Source/modules/fetch/Fe...
>
> Oh, I misunderstood the semantics of obtainBlobDataHandle();
> I thought the data is still available via reader after obtainBlobDataHandle(),
> but the reader should return Done after obtainBlobDataHandle(), right?
I thought so.
> If so, name such as drainAsBlobDataHandle() might be better.
Agreed.
> Also, maybe drainAsBlobDataHandle() should be a member of Handle (not reader)
> and require that the handle is not locked when called, to avoid situation like
> drainAsBlobDataHandle() is called during two-phase.
After the first read / beginRead, drainAsBlobDataHandle() will return nullptr. I
think it should be no problem.
Placing it in Reader means it works as reading all data synchronously from the
reader and returning the handle.
Placing it in Handle means it works as taking an internal reader, reading all
data synchronously from the reader, releasing the reader and returning the
handle.
Both look reasonable to me.
hiroshige
On 2015/06/17 11:11:47, yhirano wrote: > On 2015/06/17 10:55:31, hiroshige wrote: > > On 2015/06/17 ...
4 years, 10 months ago
(2015-06-17 16:23:02 UTC)
#13
On 2015/06/17 11:11:47, yhirano wrote:
> On 2015/06/17 10:55:31, hiroshige wrote:
> > On 2015/06/17 09:36:35, yhirano wrote:
> > > Looks good, but I have a question about FetchDataConsumerHandle.h
interface
> at
> > > [1].
> > > One possible fix is to state that obtainBlobDataConsumerHandle will not
> return
> > a
> > > valid handle with size unset.
> > >
> > > 1:
> > >
> >
>
https://codereview.chromium.org/1179393007/diff/80001/Source/modules/fetch/Fe...
> >
> > Oh, I misunderstood the semantics of obtainBlobDataHandle();
> > I thought the data is still available via reader after
obtainBlobDataHandle(),
> > but the reader should return Done after obtainBlobDataHandle(), right?
> I thought so.
>
> > If so, name such as drainAsBlobDataHandle() might be better.
> Agreed.
>
> > Also, maybe drainAsBlobDataHandle() should be a member of Handle (not
reader)
> > and require that the handle is not locked when called, to avoid situation
like
> > drainAsBlobDataHandle() is called during two-phase.
> After the first read / beginRead, drainAsBlobDataHandle() will return nullptr.
I
> think it should be no problem.
>
> Placing it in Reader means it works as reading all data synchronously from the
> reader and returning the handle.
> Placing it in Handle means it works as taking an internal reader, reading all
> data synchronously from the reader, releasing the reader and returning the
> handle.
>
> Both look reasonable to me.
Done: I renamed obtainBlobDataHandle to drainAsBlobDataHandle, and updated the
comments.
hiroshige
> After the first read / beginRead, drainAsBlobDataHandle() will return nullptr. > think it should ...
4 years, 10 months ago
(2015-06-17 16:24:55 UTC)
#14
> After the first read / beginRead, drainAsBlobDataHandle() will return nullptr.
> think it should be no problem.
I see. So I kept drainAsBlobDataHandle() in Reader.
yhirano
lgtm
4 years, 10 months ago
(2015-06-18 06:46:43 UTC)
#15
lgtm
hiroshige
The CQ bit was checked by hiroshige@chromium.org
4 years, 10 months ago
(2015-06-18 07:02:04 UTC)
#16
Issue 1176243004: Add FetchDataConsumerHandle and utility functions/classes
(Closed)
Created 4 years, 10 months ago by hiroshige
Modified 4 years, 10 months ago
Reviewers: yhirano
Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Comments: 30