| Index: net/http/http_stream_factory_impl_job.cc
|
| diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
|
| index 2aa4d31e0de062d8aed6eb02f9aae524f21b00d3..5d34a8d74b61be74ceb3adeccdc2cb2d94b510bd 100644
|
| --- a/net/http/http_stream_factory_impl_job.cc
|
| +++ b/net/http/http_stream_factory_impl_job.cc
|
| @@ -345,8 +345,18 @@ void HttpStreamFactoryImpl::Job::Orphan() {
|
|
|
| void HttpStreamFactoryImpl::Job::SetPriority(RequestPriority priority) {
|
| priority_ = priority;
|
| - // TODO(akalin): Propagate this to |connection_| and maybe the
|
| - // preconnect state.
|
| + // Ownership of |connection_| is passed to the newly created stream
|
| + // or H2 session in DoCreateStream(), and the consumer is not
|
| + // notified immediately, so this call may occur when |connection_|
|
| + // is null.
|
| + //
|
| + // Note that streams are created without a priority associated with them,
|
| + // and it is up to the consumer to set their priority via
|
| + // HttpStream::InitializeStream(). So there is no need for this code
|
| + // to propagate priority changes to the newly created stream.
|
| + if (connection_ && connection_->is_initialized())
|
| + connection_->SetPriority(priority);
|
| + // TODO(akalin): Maybe Propagate this to the preconnect state.
|
| }
|
|
|
| bool HttpStreamFactoryImpl::Job::was_alpn_negotiated() const {
|
|
|