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

Unified Diff: content/browser/worker_host/worker_process_host.cc

Issue 22314003: NavigationController prototype Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NavController prototype - chrome side Created 7 years, 3 months 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: content/browser/worker_host/worker_process_host.cc
diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc
index c537447f987a83de52b9c590334b3cf8fac83f02..e4b6c21c75e2f817ac7efab0e6ec0a34f6f53251 100644
--- a/content/browser/worker_host/worker_process_host.cc
+++ b/content/browser/worker_host/worker_process_host.cc
@@ -153,6 +153,8 @@ bool WorkerProcessHost::Init(int render_process_id) {
#if defined(OS_LINUX)
int flags = ChildProcessHost::CHILD_ALLOW_SELF;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDebugChildren))
+ flags = ChildProcessHost::CHILD_NORMAL;
#else
int flags = ChildProcessHost::CHILD_NORMAL;
#endif
@@ -204,7 +206,7 @@ bool WorkerProcessHost::Init(int render_process_id) {
if (value.empty() || value == switches::kWorkerProcess) {
// launches a new xterm, and runs the worker process in gdb, reading
// optional commands from gdb_chrome file in the working directory.
- cmd_line->PrependWrapper("xterm -e gdb -x gdb_chrome --args");
+ cmd_line->PrependWrapper("xterm -e gdb --args");
use_zygote = false;
}
}
@@ -295,6 +297,8 @@ void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) {
params.route_id = instance.worker_route_id();
params.creator_process_id = instance.parent_process_id();
params.shared_worker_appcache_id = instance.main_resource_appcache_id();
+ params.is_controller = false; // originating from a renderer, so
+ // definitely not a controller
Send(new WorkerProcessMsg_CreateWorker(params));
UpdateTitle();
@@ -486,14 +490,13 @@ void WorkerProcessHost::ShutdownSocketStreamDispatcherHostIfNecessary() {
void WorkerProcessHost::FilterShutdown(WorkerMessageFilter* filter) {
for (Instances::iterator i = instances_.begin(); i != instances_.end();) {
- bool shutdown = false;
+ if (i->is_embedded_worker_) {
+ ++i;
+ continue;
+ }
i->RemoveFilters(filter);
-
i->worker_document_set()->RemoveAll(filter);
if (i->worker_document_set()->IsEmpty()) {
- shutdown = true;
- }
- if (shutdown) {
Send(new WorkerMsg_TerminateWorkerContext(i->worker_route_id()));
i = instances_.erase(i);
} else {
@@ -545,6 +548,10 @@ void WorkerProcessHost::DocumentDetached(WorkerMessageFilter* filter,
unsigned long long document_id) {
// Walk all instances and remove the document from their document set.
for (Instances::iterator i = instances_.begin(); i != instances_.end();) {
+ if (i->is_embedded_worker_) {
+ ++i;
+ continue;
+ }
i->worker_document_set()->Remove(filter, document_id);
if (i->worker_document_set()->IsEmpty()) {
// This worker has no more associated documents - shut it down.
« no previous file with comments | « content/browser/worker_host/worker_process_host.h ('k') | content/browser/worker_host/worker_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698