Remove unnecessary array allocation in cronet_bidirectional_stream_adapter.cc
Save arguments passed in through WritevData directly instead
of a list of IOBufferWithByteBuffer.
This saves unnecessary array allocations to reconstruct Java
arguments for invoking onWriteCompleted.
BUG=611056
Review-Url: https://codereview.chromium.org/1969893002
Cr-Commit-Position: refs/heads/master@{#393901}
diff --git a/net/quic/quic_chromium_client_stream.cc b/net/quic/quic_chromium_client_stream.cc
index 1aa8e53..0f21d51 100644
--- a/net/quic/quic_chromium_client_stream.cc
+++ b/net/quic/quic_chromium_client_stream.cc
@@ -140,7 +140,7 @@
}
int QuicChromiumClientStream::WritevStreamData(
- const std::vector<IOBuffer*>& buffers,
+ const std::vector<scoped_refptr<IOBuffer>>& buffers,
const std::vector<int>& lengths,
bool fin,
const CompletionCallback& callback) {