Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1454)

Unified Diff: chrome/browser/renderer_host/resource_request_details.cc

Issue 6055002: Create a message filter for message port messages. This allows a nice cleanu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/resource_request_details.cc
===================================================================
--- chrome/browser/renderer_host/resource_request_details.cc (revision 69724)
+++ chrome/browser/renderer_host/resource_request_details.cc (working copy)
@@ -4,6 +4,8 @@
#include "chrome/browser/renderer_host/resource_request_details.h"
+#include "chrome/browser/worker_host/worker_service.h"
+
ResourceRequestDetails::ResourceRequestDetails(const net::URLRequest* request,
int cert_id)
: url_(request->url()),
@@ -25,18 +27,13 @@
// If request is from the worker process on behalf of a renderer, use
// the renderer process id, since it consumes the notification response
// such as ssl state etc.
- const WorkerProcessHost::WorkerInstance* worker_instance =
- WorkerService::GetInstance()->FindWorkerInstance(info->child_id());
- if (worker_instance) {
- DCHECK(!worker_instance->worker_document_set()->IsEmpty());
- const WorkerDocumentSet::DocumentInfoSet& parents =
- worker_instance->worker_document_set()->documents();
- // TODO(atwilson): need to notify all associated renderers in the case
- // of ssl state change (http://crbug.com/25357). For now, just notify
- // the first one (works for dedicated workers and shared workers with
- // a single process).
- origin_child_id_ = parents.begin()->renderer_id();
- } else {
+ // TODO(atwilson): need to notify all associated renderers in the case
+ // of ssl state change (http://crbug.com/25357). For now, just notify
+ // the first one (works for dedicated workers and shared workers with
+ // a single process).
+ int temp;
+ if (!WorkerService::GetInstance()->GetRendererForWorker(
+ info->child_id(), &origin_child_id_, &temp)) {
origin_child_id_ = info->child_id();
}
}

Powered by Google App Engine
This is Rietveld 408576698