| Index: net/http/http_network_transaction.cc
|
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
|
| index b7ceb430bd9ea8bc3f1b202cdf7aaf483f3b4976..4b5a3b0299eb6de3303daf73b7a657012181d84a 100644
|
| --- a/net/http/http_network_transaction.cc
|
| +++ b/net/http/http_network_transaction.cc
|
| @@ -421,11 +421,16 @@ void HttpNetworkTransaction::PopulateNetErrorDetails(
|
| void HttpNetworkTransaction::SetPriority(RequestPriority priority) {
|
| priority_ = priority;
|
|
|
| - // TODO: Note that if throttling is ever implemented below this
|
| - // level, either of the two below calls may result in request
|
| - // completion, callbacks, and the potential deletion of this object
|
| - // (like the call below to throttle_->SetPriority()). In that case,
|
| - // this code will need to be modified.
|
| + // TODO(rdsmith): Note that if any code indirectly executed by
|
| + // |stream_request_->SetPriority()| or |stream_->SetPriority()|
|
| + // ever implements a throttling mechanism where changing a request's
|
| + // priority may cause a this or another request to synchronously succeed
|
| + // or fail, that callback could synchronously delete |*this|, causing
|
| + // a crash on return to this code.
|
| + //
|
| + // |throttle_->SetPriority()| has exactly the above attributes, which
|
| + // is why it's the last call in this function.
|
| +
|
| if (stream_request_)
|
| stream_request_->SetPriority(priority);
|
| if (stream_)
|
|
|