diff options
Diffstat (limited to 'chrome/browser/renderer_host/resource_dispatcher_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 65182c2..2907d7f 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -159,7 +159,11 @@ class RVHDelegateNotificationTask : public Task { if (!ResourceDispatcherHost::RenderViewForRequest(request, &render_process_host_id_, &render_view_host_id_)) { - NOTREACHED(); + // Issue a warning here - this can happen during normal operation (for + // example, if a worker exits while a network operation is pending), but + // it should be fairly rare. + DLOG(WARNING) << "Trying to deliver a message to a RenderViewHost" << + " that has already exited or has never existed."; } } @@ -1451,8 +1455,13 @@ bool ResourceDispatcherHost::RenderViewForRequest(const URLRequest* request, *render_view_host_id = -1; return false; } - *render_process_host_id = worker_instance->renderer_id(); - *render_view_host_id = worker_instance->render_view_route_id(); + 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(); |