Chromium Code Reviews| Index: net/url_request/url_request.cc |
| =================================================================== |
| --- net/url_request/url_request.cc (revision 161387) |
| +++ net/url_request/url_request.cc (working copy) |
| @@ -317,7 +317,8 @@ |
| } |
| LoadStateWithParam URLRequest::GetLoadState() const { |
| - if (blocked_on_delegate_) { |
| + // Only return LOAD_STATE_WAITING_FOR_DELEGATE if there's a load state param. |
| + if (blocked_on_delegate_ && !load_state_param_.empty()) { |
|
mmenke
2012/11/07 17:25:25
This is need because the text we display on the lo
eroman
2012/11/13 20:50:11
Do you know what circumstances this happens, and w
|
| return LoadStateWithParam(LOAD_STATE_WAITING_FOR_DELEGATE, |
| load_state_param_); |
| } |
| @@ -638,6 +639,7 @@ |
| RestartWithJob(job); |
| } else if (delegate_) { |
| delegate_->OnReceivedRedirect(this, location, defer_redirect); |
| + // |this| may be have been destroyed here. |
| } |
| } |
| @@ -950,7 +952,12 @@ |
| void URLRequest::SetBlockedOnDelegate() { |
| blocked_on_delegate_ = true; |
| - net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE); |
| + if (!load_state_param_.empty()) { |
| + net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE, |
| + NetLog::StringCallback("delegate", &load_state_param_)); |
| + } else { |
| + net_log_.BeginEvent(NetLog::TYPE_URL_REQUEST_BLOCKED_ON_DELEGATE); |
| + } |
| } |
| void URLRequest::SetUnblockedOnDelegate() { |