|
|
Chromium Code Reviews
DescriptionUse SharedMemoryDataConsumerHandle for stream data.
The current (experimental) XHR-stream uses WebDataConsumerHandleImpl which
is based on mojo. In order to introduce the backpressure mechanism and for
performance, we switch the implementation to SharedMemoryDataConsumerHandle
which uses the shared memory directly.
As a result, this CL enables the backpressure mechanism on XHR-streams
when the response has "Cache-Control: no-store" header. Devtools behavior
with streams is also improved, because the body contents are now shown.
This CL also fixes a FixedReceivedData defect which was introduced in
a previous CL.
BUG=480746
Committed: https://crrev.com/69175410460ac676304dbba52a2decc76adf0403
Cr-Commit-Position: refs/heads/master@{#334369}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : rebase #Patch Set 5 : #
Total comments: 6
Patch Set 6 : #
Total comments: 2
Messages
Total messages: 41 (15 generated)
yhirano@chromium.org changed reviewers: + tyoshino@chromium.org
This CL depends on https://codereview.chromium.org/1144033002/ and https://codereview.chromium.org/1150413003/.
ping
At PS5 I fixed a mistake which I made at the previous CL.
ping
On 2015/06/05 11:03:58, yhirano wrote: > At PS5 I fixed a mistake which I made at the previous CL. OK. Please explain that briefly in the CL description.
lgtm https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... content/child/web_url_loader_impl.cc:621: client_->didReceiveResponse(loader_, response, reader.release()); how about skipping the rest of this function until as we don't support ftp_listing_delegate_, etc. for now?
hiroshige@chromium.org changed reviewers: + hiroshige@chromium.org
https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... content/child/web_url_loader_impl.cc:737: client_->didFinishLoading(loader_, Here |client_| can be null and |if(client_)| is needed? body_stream_writer_.reset(); -> Writer is closed -> didGetReadable() is called -> Done is returned for beginRead() -> Client call corresponding ThreadbleLoader::cancel() -> WebURLLoaderImpl::cancel() -> WebURLLoaderImpl::Context::Cancel() -> client_ is cleared. Stack trace: content::WebURLLoaderImpl::Context::Cancel() content::WebURLLoaderImpl::cancel() blink::ResourceLoader::cancel() blink::ResourceLoader::cancel() blink::ResourceLoader::cancelIfNotFinishing() blink::Resource::cancelTimerFired() blink::Resource::allClientsRemoved() blink::Resource::removeClient() blink::ResourceOwner<>::setResource() blink::ResourceOwner<>::clearResource() blink::DocumentThreadableLoader::cancelWithError() blink::DocumentThreadableLoader::cancel() blink::FetchManager::Loader::cancel() blink::FetchManager::Loader::Canceller::cancel() blink::(anonymous namespace)::WebDataConsumerHandleAdapter::close() blink::(anonymous namespace)::WebDataConsumerHandleAdapter::didGetReadable() content::SharedMemoryDataConsumerHandle::Context::NotifyInternal() content::SharedMemoryDataConsumerHandle::Context::Notify() content::SharedMemoryDataConsumerHandle::Writer::Close() content::SharedMemoryDataConsumerHandle::Writer::~Writer() base::DefaultDeleter<>::operator()() base::internal::scoped_ptr_impl<>::reset() scoped_ptr<>::reset() content::WebURLLoaderImpl::Context::OnCompletedRequest()
https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... content/child/web_url_loader_impl.cc:730: client_->didFail( We have to pass failures to |body_stream_writer_|/Stream if request_.useStreamOnResponse(). (This seems the case in the 'Error in text() should be propagated to the body stream.' test in stream-reader.js (if my ongoing CLs https://codereview.chromium.org/1171913003/ (PS14) are applied); didFail() is called but no failure is observed via WebDataConsumerHandle::Reader?)
https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... content/child/web_url_loader_impl.cc:621: client_->didReceiveResponse(loader_, response, reader.release()); On 2015/06/10 13:45:55, tyoshino wrote: > how about skipping the rest of this function until as we don't support > ftp_listing_delegate_, etc. for now? Done. https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... content/child/web_url_loader_impl.cc:730: client_->didFail( On 2015/06/11 00:58:00, hiroshige wrote: > We have to pass failures to |body_stream_writer_|/Stream if > request_.useStreamOnResponse(). > (This seems the case in the 'Error in text() should be propagated to the body > stream.' test in stream-reader.js (if my ongoing CLs > https://codereview.chromium.org/1171913003/ (PS14) are applied); didFail() is > called but no failure is observed via WebDataConsumerHandle::Reader?) I have another WIP CL addressing this issue: https://codereview.chromium.org/1181573003/ Let me land this CL to unblock other CLs. https://codereview.chromium.org/1150033004/diff/80001/content/child/web_url_l... content/child/web_url_loader_impl.cc:737: client_->didFinishLoading(loader_, On 2015/06/11 00:01:58, hiroshige wrote: > Here |client_| can be null and |if(client_)| is needed? > > body_stream_writer_.reset(); > -> Writer is closed > -> didGetReadable() is called > -> Done is returned for beginRead() > -> Client call corresponding ThreadbleLoader::cancel() > -> WebURLLoaderImpl::cancel() > -> WebURLLoaderImpl::Context::Cancel() > -> client_ is cleared. > > Stack trace: > content::WebURLLoaderImpl::Context::Cancel() > content::WebURLLoaderImpl::cancel() > blink::ResourceLoader::cancel() > blink::ResourceLoader::cancel() > blink::ResourceLoader::cancelIfNotFinishing() > blink::Resource::cancelTimerFired() > blink::Resource::allClientsRemoved() > blink::Resource::removeClient() > blink::ResourceOwner<>::setResource() > blink::ResourceOwner<>::clearResource() > blink::DocumentThreadableLoader::cancelWithError() > blink::DocumentThreadableLoader::cancel() > blink::FetchManager::Loader::cancel() > blink::FetchManager::Loader::Canceller::cancel() > blink::(anonymous namespace)::WebDataConsumerHandleAdapter::close() > blink::(anonymous namespace)::WebDataConsumerHandleAdapter::didGetReadable() > content::SharedMemoryDataConsumerHandle::Context::NotifyInternal() > content::SharedMemoryDataConsumerHandle::Context::Notify() > content::SharedMemoryDataConsumerHandle::Writer::Close() > content::SharedMemoryDataConsumerHandle::Writer::~Writer() > base::DefaultDeleter<>::operator()() > base::internal::scoped_ptr_impl<>::reset() > scoped_ptr<>::reset() > content::WebURLLoaderImpl::Context::OnCompletedRequest() Done.
On 2015/06/10 13:45:48, tyoshino wrote: > On 2015/06/05 11:03:58, yhirano wrote: > > At PS5 I fixed a mistake which I made at the previous CL. > > OK. Please explain that briefly in the CL description. Done.
lgtm. https://codereview.chromium.org/1150033004/diff/100001/content/child/web_url_... File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1150033004/diff/100001/content/child/web_url_... content/child/web_url_loader_impl.cc:692: client_->didReceiveData(loader_, payload, data_length, encoded_data_length); This CL also fix a bug of stream+DevTools here? If so, please mention this briefly in the CL description.
https://codereview.chromium.org/1150033004/diff/100001/content/child/web_url_... File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/1150033004/diff/100001/content/child/web_url_... content/child/web_url_loader_impl.cc:692: client_->didReceiveData(loader_, payload, data_length, encoded_data_length); On 2015/06/12 05:57:25, hiroshige wrote: > This CL also fix a bug of stream+DevTools here? > If so, please mention this briefly in the CL description. Done.
yhirano@chromium.org changed reviewers: + avi@chromium.org
+avi for OWNER review.
lgtm stampity stamp
The CQ bit was checked by yhirano@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tyoshino@chromium.org Link to the patchset: https://codereview.chromium.org/1150033004/#ps100001 (title: " ")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150033004/100001
The CQ bit was unchecked by yhirano@chromium.org
The CQ bit was checked by yhirano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150033004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by yhirano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150033004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by yhirano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150033004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by yhirano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150033004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by yhirano@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150033004/100001
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/69175410460ac676304dbba52a2decc76adf0403 Cr-Commit-Position: refs/heads/master@{#334369} |
