Fix crash in SpdyStream::SetPriority.
When a ConnectJob is assigned to a request in the socket pool, there is
often some reassignment of ConnectJobs to stream requests. This can
result in reprioritizing ConnectJobs. If one of those ConnectJobs was
using a SpdyProxyClientSocket that is using a torn down SpdySession,
trying to change its priority would result in a null dereference.
This CL makes reprioritizing SpdyProxyClientSockets and
QuicProxyClientSockets do nothing, as the reprioritizations in this
stage are often superfluous, and doesn't really get us much in either
case.
In followup CLs, I both want to remove the unnecessary reprioritizations
and use a fixed priority of all H2/QUIC tunnels.
Bug: 940848
Change-Id: I7c646b1bfcb18977dc2837c73f7b05172d6f908d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521279
Commit-Queue: Ryan Hamilton <[email protected]>
Reviewed-by: Ryan Hamilton <[email protected]>
Cr-Commit-Position: refs/heads/master@{#640936}
diff --git a/net/quic/quic_proxy_client_socket_unittest.cc b/net/quic/quic_proxy_client_socket_unittest.cc
index d693d21..e5ed0a6 100644
--- a/net/quic/quic_proxy_client_socket_unittest.cc
+++ b/net/quic/quic_proxy_client_socket_unittest.cc
@@ -834,8 +834,10 @@
TEST_P(QuicProxyClientSocketTest, SetStreamPriority) {
mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructSettingsPacket(1));
+ // Despite setting the priority to HIGHEST, the requets initial priority of
+ // LOWEST is used.
mock_quic_data_.AddWrite(SYNCHRONOUS,
- ConstructConnectRequestPacket(2, HIGHEST));
+ ConstructConnectRequestPacket(2, LOWEST));
mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
mock_quic_data_.AddWrite(