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

Side by Side Diff: content/child/child_thread.cc

Issue 245443005: Move IPC::MessageFilter and router to a separate file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gn build Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/child_resource_message_filter.h ('k') | content/child/db_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/child_thread.h" 5 #include "content/child/child_thread.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // A non joinable thread has been created. The thread will either terminate 102 // A non joinable thread has been created. The thread will either terminate
103 // the process or will be terminated by the process. Therefore, keep the 103 // the process or will be terminated by the process. Therefore, keep the
104 // delegate object alive for the lifetime of the process. 104 // delegate object alive for the lifetime of the process.
105 WaitAndExitDelegate* leaking_delegate = delegate.release(); 105 WaitAndExitDelegate* leaking_delegate = delegate.release();
106 ANNOTATE_LEAKING_OBJECT_PTR(leaking_delegate); 106 ANNOTATE_LEAKING_OBJECT_PTR(leaking_delegate);
107 ignore_result(leaking_delegate); 107 ignore_result(leaking_delegate);
108 return true; 108 return true;
109 } 109 }
110 #endif 110 #endif
111 111
112 class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter { 112 class SuicideOnChannelErrorFilter : public IPC::MessageFilter {
113 public: 113 public:
114 // IPC::ChannelProxy::MessageFilter 114 // IPC::MessageFilter
115 virtual void OnChannelError() OVERRIDE { 115 virtual void OnChannelError() OVERRIDE {
116 // For renderer/worker processes: 116 // For renderer/worker processes:
117 // On POSIX, at least, one can install an unload handler which loops 117 // On POSIX, at least, one can install an unload handler which loops
118 // forever and leave behind a renderer process which eats 100% CPU forever. 118 // forever and leave behind a renderer process which eats 100% CPU forever.
119 // 119 //
120 // This is because the terminate signals (ViewMsg_ShouldClose and the error 120 // This is because the terminate signals (ViewMsg_ShouldClose and the error
121 // from the IPC channel) are routed to the main message loop but never 121 // from the IPC channel) are routed to the main message loop but never
122 // processed (because that message loop is stuck in V8). 122 // processed (because that message loop is stuck in V8).
123 // 123 //
124 // One could make the browser SIGKILL the renderers, but that leaves open a 124 // One could make the browser SIGKILL the renderers, but that leaves open a
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // inflight that would addref it. 533 // inflight that would addref it.
534 Send(new ChildProcessHostMsg_ShutdownRequest); 534 Send(new ChildProcessHostMsg_ShutdownRequest);
535 } 535 }
536 536
537 void ChildThread::EnsureConnected() { 537 void ChildThread::EnsureConnected() {
538 VLOG(0) << "ChildThread::EnsureConnected()"; 538 VLOG(0) << "ChildThread::EnsureConnected()";
539 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); 539 base::KillProcess(base::GetCurrentProcessHandle(), 0, false);
540 } 540 }
541 541
542 } // namespace content 542 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_resource_message_filter.h ('k') | content/child/db_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698