Chromium Code Reviews| Index: content/child/resource_dispatcher.cc |
| diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc |
| index 3cbc9ff68c4277c46935b2f1bbe7f4f1c56c3019..cf5d047bc4cbeccc6b9e1a42b595719f578e8353 100644 |
| --- a/content/child/resource_dispatcher.cc |
| +++ b/content/child/resource_dispatcher.cc |
| @@ -483,9 +483,14 @@ void ResourceDispatcher::SetDefersLoading(int request_id, bool value) { |
| } |
| if (value) { |
| request_info->is_deferred = value; |
| + if (request_info->url_loader_client) |
| + request_info->url_loader_client->SetDefersLoading(); |
| } else if (request_info->is_deferred) { |
| request_info->is_deferred = false; |
| + if (request_info->url_loader_client) |
| + request_info->url_loader_client->UnsetDefersLoading(); |
| + |
| FollowPendingRedirect(request_id, request_info); |
| main_thread_task_runner_->PostTask( |
| @@ -553,6 +558,10 @@ void ResourceDispatcher::FlushDeferredMessages(int request_id) { |
| PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); |
| if (!request_info || request_info->is_deferred) |
| return; |
| + |
| + if (request_info->url_loader) |
| + request_info->url_loader_client->FlushDeferredMessages(); |
|
kinuko
2016/12/23 13:11:23
Having two pending queues is confusing, it seems i
yhirano
2016/12/26 05:08:35
I've just noticed that |request_info| can be broke
|
| + |
| // Because message handlers could result in request_info being destroyed, |
| // we need to work with a stack reference to the deferred queue. |
| MessageQueue q; |