| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 void RenderProcessHostImpl::EnableSendQueue() { | 831 void RenderProcessHostImpl::EnableSendQueue() { |
| 832 is_initialized_ = false; | 832 is_initialized_ = false; |
| 833 } | 833 } |
| 834 | 834 |
| 835 bool RenderProcessHostImpl::Init() { | 835 bool RenderProcessHostImpl::Init() { |
| 836 // calling Init() more than once does nothing, this makes it more convenient | 836 // calling Init() more than once does nothing, this makes it more convenient |
| 837 // for the view host which may not be sure in some cases | 837 // for the view host which may not be sure in some cases |
| 838 if (channel_) | 838 if (channel_) |
| 839 return true; | 839 return true; |
| 840 | 840 |
| 841 // Ensure that the RouteProvider proxy is re-initialized on next access since |
| 842 // it's associated with a specific Channel instance. |
| 843 remote_route_provider_.reset(); |
| 844 |
| 841 base::CommandLine::StringType renderer_prefix; | 845 base::CommandLine::StringType renderer_prefix; |
| 842 // A command prefix is something prepended to the command line of the spawned | 846 // A command prefix is something prepended to the command line of the spawned |
| 843 // process. | 847 // process. |
| 844 const base::CommandLine& browser_command_line = | 848 const base::CommandLine& browser_command_line = |
| 845 *base::CommandLine::ForCurrentProcess(); | 849 *base::CommandLine::ForCurrentProcess(); |
| 846 renderer_prefix = | 850 renderer_prefix = |
| 847 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 851 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
| 848 | 852 |
| 849 #if defined(OS_LINUX) | 853 #if defined(OS_LINUX) |
| 850 int flags = renderer_prefix.empty() ? ChildProcessHost::CHILD_ALLOW_SELF | 854 int flags = renderer_prefix.empty() ? ChildProcessHost::CHILD_ALLOW_SELF |
| (...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2982 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2986 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2983 | 2987 |
| 2984 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2988 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2985 // enough information here so that we can determine what the bad message was. | 2989 // enough information here so that we can determine what the bad message was. |
| 2986 base::debug::Alias(&error); | 2990 base::debug::Alias(&error); |
| 2987 bad_message::ReceivedBadMessage(process.get(), | 2991 bad_message::ReceivedBadMessage(process.get(), |
| 2988 bad_message::RPH_MOJO_PROCESS_ERROR); | 2992 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 2989 } | 2993 } |
| 2990 | 2994 |
| 2991 } // namespace content | 2995 } // namespace content |
| OLD | NEW |