Commit 682206aa authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

ChunkedUploadDataPipeGetter: Stop watching the pipe before destroying it

This currently seems to work, but isn't a great idea, and the code isn't
expecting another callback after that point, anyways.

Bug: 821067
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I57a7cd5b71d1859c72a1dcbf76fba3f68943e45f
Reviewed-on: https://chromium-review.googlesource.com/966986
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarHelen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543811}
parent 11766612
......@@ -102,8 +102,12 @@ int ChunkedDataPipeUploadDataStream::ReadInternal(net::IOBuffer* buf,
// The pipe was closed. If the size isn't known yet, could be a success or a
// failure.
if (!size_) {
// Need to keep the buffer around because its presence is used to indicate
// that there's a pending UploadDataStream read.
buf_ = buf;
buf_len_ = buf_len;
handle_watcher_.Cancel();
data_pipe_.reset();
return net::ERR_IO_PENDING;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment