Chromium Code Reviews| 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 375a71b9d3c5d208a7f573674fb410f542ac1141..0182feddaebd04b1814a7cf1be0bc056cff835c7 100644 |
| --- a/net/http/http_stream_factory_impl_job.cc |
| +++ b/net/http/http_stream_factory_impl_job.cc |
| @@ -318,8 +318,15 @@ 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. |
| + // TODO(rdsmith): Also set the priority on the stream, if it's present, to |
| + // make sure the above race doesn't drop a reprioritization on the floor. |
|
mmenke
2017/01/05 20:18:35
I see some ways to test it, but nothing that seems
Randy Smith (Not in Mondays)
2017/01/13 23:05:44
You know, unless you object after reading the foll
|
| + if (connection_ && connection_->is_initialized()) |
| + connection_->SetPriority(priority); |
| + // TODO(akalin): Maybe Propagate this to the preconnect state. |
| } |
| bool HttpStreamFactoryImpl::Job::was_alpn_negotiated() const { |