Index: chrome/browser/renderer_host/resource_dispatcher_host.cc |
=================================================================== |
--- chrome/browser/renderer_host/resource_dispatcher_host.cc (revision 69724) |
+++ chrome/browser/renderer_host/resource_dispatcher_host.cc (working copy) |
@@ -1518,20 +1518,14 @@ |
// If the request is from the worker process, find a tab that owns the worker. |
if (info->process_type() == ChildProcessInfo::WORKER_PROCESS) { |
- const WorkerProcessHost::WorkerInstance* worker_instance = |
- WorkerService::GetInstance()->FindWorkerInstance(info->child_id()); |
- if (!worker_instance) { |
+ // Need to display some related UI for this network request - pick an |
+ // arbitrary parent to do so. |
+ if (!WorkerService::GetInstance()->GetRendererForWorker( |
+ info->child_id(), render_process_host_id, render_view_host_id)) { |
*render_process_host_id = -1; |
*render_view_host_id = -1; |
return false; |
} |
- DCHECK(!worker_instance->worker_document_set()->IsEmpty()); |
- const WorkerDocumentSet::DocumentInfoSet& parents = |
- worker_instance->worker_document_set()->documents(); |
- // Need to display some related UI for this network request - pick an |
- // arbitrary parent to do so. |
- *render_process_host_id = parents.begin()->renderer_id(); |
- *render_view_host_id = parents.begin()->render_view_route_id(); |
} else { |
*render_process_host_id = info->child_id(); |
*render_view_host_id = info->route_id(); |