|
|
DescriptionMake FetchDataLoader accept BytesConsumer
This CL makes FetchDataLoader accept a BytesConsumer instead of
FetchDataConsumerHandle.
This CL removes many statements clearing pointers, because
- As onStateChange will not be called after the consumer is
closed or errored, clearing |m_client| is not necessary.
- Unlike FetchDataConsumerHandle::Reader, BytesConsumer doesn't
rely on the destructor. Instead, we need to cancel it appropriately.
- Clearing |m_decoder| is not necessary and they will be
destructed when the loader is destructed.
BUG=610195
Committed: https://crrev.com/6963b6b43faef1611ba0c380c3de7aa4ec22a1ed
Cr-Commit-Position: refs/heads/master@{#412447}
Patch Set 1 : fix #Patch Set 2 : fix #Patch Set 3 : fix #
Total comments: 8
Patch Set 4 : fix #
Total comments: 2
Patch Set 5 : fix #
Dependent Patchsets: Messages
Total messages: 46 (36 generated)
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #3 (id:40001) has been deleted
Patchset #2 (id:20001) has been deleted
Patchset #1 (id:1) has been deleted
Description was changed from ========== Make FetchDataLoader take ownership of FetchDataConsumerHandle This is a preparation for making FetchDataLoader use BytesConsumer instead of FetchDataConsumerHandle. This CL doesn't change the behavior. BUG=610195 ========== to ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. BUG=610195 ==========
yhirano@chromium.org changed reviewers: + hiroshige@chromium.org
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
Unit tests are failing.
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/08/12 06:02:31, hiroshige wrote: > Unit tests are failing. Sorry, fixed.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
(From offline discussion) This CL makes FetchDataLoader not to clear when done/errored/cancelled: - |m_client| because BytesConsumer must ensure no notifications are done to its client (i.e. FetchDataLoader) - |m_consumer| because, unlike FetchDataConsumerHandle::Reader, |m_consumer| don't rely on its destructor much and we don't need destruct after the consumer becomes done/errored or is cancelled. - |m_decoder| etc. Clearing |m_decoder| etc. would still have effect on destructing the pointed object, so this CL delays |*m_decoder| destruction from the point of done/errored/cancelled to the FetchDataLoader's destruction. Is this OK? (perhaps OK because FetchDataLoader is not expected to be alive long after its completion) Could you briefly mention these changes in the CL description? https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp (left): https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:352: // process. Is this issue fixed? https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp (right): https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:122: DCHECK(m_consumer); This CL removes DCHECK(m_client) and DCHECK(m_consumer) in FetchDataLoaderAsBlobHandle because we no longer explicitly clears these pointers, while keeps the DCHECKs here. Can we make them consistent? https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:187: DCHECK(m_consumer); ditto. https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:253: DCHECK(m_consumer); ditto.
Description was changed from ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. BUG=610195 ========== to ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. This CL removes many statements clearing pointers, because - As onStateChange will not be called after the consumer is closed or errored, clearing |m_client| is not necessary. - Unlike FetchDataConsumerHandle::Reader, BytesConsumer doesn't rely on the destructor. Instead, we need to cancel it appropriately. - Clearing |m_decoder| is not necessary and they will be destructed when the loader is destructed. BUG=610195 ==========
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Updated the CL description. https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp (left): https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:352: // process. On 2016/08/12 08:21:17, hiroshige wrote: > Is this issue fixed? Oops, no. https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp (right): https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:122: DCHECK(m_consumer); On 2016/08/12 08:21:17, hiroshige wrote: > This CL removes DCHECK(m_client) and DCHECK(m_consumer) in > FetchDataLoaderAsBlobHandle because we no longer explicitly clears these > pointers, while keeps the DCHECKs here. Can we make them consistent? Done. https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:187: DCHECK(m_consumer); On 2016/08/12 08:21:17, hiroshige wrote: > ditto. Done. https://codereview.chromium.org/2229313002/diff/100001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp:253: DCHECK(m_consumer); On 2016/08/12 08:21:17, hiroshige wrote: > ditto. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm. https://codereview.chromium.org/2229313002/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/fetch/BytesConsumer.h (right): https://codereview.chromium.org/2229313002/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/BytesConsumer.h:62: // function cannot be called when the state is closed or errored before nit: how about "... but it is guaranteed that this function cannot be called after the state is closed or errored"?
The CQ bit was checked by yhirano@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2229313002/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/modules/fetch/BytesConsumer.h (right): https://codereview.chromium.org/2229313002/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/modules/fetch/BytesConsumer.h:62: // function cannot be called when the state is closed or errored before On 2016/08/15 07:09:57, hiroshige wrote: > nit: how about "... but it is guaranteed that this function cannot be called > after the state is closed or errored"? Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yhirano@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from hiroshige@chromium.org Link to the patchset: https://codereview.chromium.org/2229313002/#ps140001 (title: "fix")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. This CL removes many statements clearing pointers, because - As onStateChange will not be called after the consumer is closed or errored, clearing |m_client| is not necessary. - Unlike FetchDataConsumerHandle::Reader, BytesConsumer doesn't rely on the destructor. Instead, we need to cancel it appropriately. - Clearing |m_decoder| is not necessary and they will be destructed when the loader is destructed. BUG=610195 ========== to ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. This CL removes many statements clearing pointers, because - As onStateChange will not be called after the consumer is closed or errored, clearing |m_client| is not necessary. - Unlike FetchDataConsumerHandle::Reader, BytesConsumer doesn't rely on the destructor. Instead, we need to cancel it appropriately. - Clearing |m_decoder| is not necessary and they will be destructed when the loader is destructed. BUG=610195 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. This CL removes many statements clearing pointers, because - As onStateChange will not be called after the consumer is closed or errored, clearing |m_client| is not necessary. - Unlike FetchDataConsumerHandle::Reader, BytesConsumer doesn't rely on the destructor. Instead, we need to cancel it appropriately. - Clearing |m_decoder| is not necessary and they will be destructed when the loader is destructed. BUG=610195 ========== to ========== Make FetchDataLoader accept BytesConsumer This CL makes FetchDataLoader accept a BytesConsumer instead of FetchDataConsumerHandle. This CL removes many statements clearing pointers, because - As onStateChange will not be called after the consumer is closed or errored, clearing |m_client| is not necessary. - Unlike FetchDataConsumerHandle::Reader, BytesConsumer doesn't rely on the destructor. Instead, we need to cancel it appropriately. - Clearing |m_decoder| is not necessary and they will be destructed when the loader is destructed. BUG=610195 Committed: https://crrev.com/6963b6b43faef1611ba0c380c3de7aa4ec22a1ed Cr-Commit-Position: refs/heads/master@{#412447} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/6963b6b43faef1611ba0c380c3de7aa4ec22a1ed Cr-Commit-Position: refs/heads/master@{#412447} |