OLD | NEW |
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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
8 #include "base/debug/leak_annotations.h" | 8 #include "base/debug/leak_annotations.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // instruction down. | 166 // instruction down. |
167 RenderProcessImpl render_process; | 167 RenderProcessImpl render_process; |
168 RenderThreadImpl::Create(main_message_loop.Pass(), | 168 RenderThreadImpl::Create(main_message_loop.Pass(), |
169 renderer_scheduler.Pass()); | 169 renderer_scheduler.Pass()); |
170 #endif | 170 #endif |
171 bool run_loop = true; | 171 bool run_loop = true; |
172 if (!no_sandbox) { | 172 if (!no_sandbox) { |
173 run_loop = platform.EnableSandbox(); | 173 run_loop = platform.EnableSandbox(); |
174 } else { | 174 } else { |
175 LOG(ERROR) << "Running without renderer sandbox"; | 175 LOG(ERROR) << "Running without renderer sandbox"; |
176 #ifndef NDEBUG | 176 #if !defined(NDEBUG) || (defined(CFI_ENFORCEMENT) && !defined(OFFICIAL_BUILD)) |
177 // For convenience, we print the stack traces for crashes. When sandbox | 177 // For convenience, we print the stack traces for crashes. When sandbox |
178 // is enabled, the in-process stack dumping is enabled as part of the | 178 // is enabled, the in-process stack dumping is enabled as part of the |
179 // EnableSandbox() call. | 179 // EnableSandbox() call. |
180 base::debug::EnableInProcessStackDumping(); | 180 base::debug::EnableInProcessStackDumping(); |
181 #endif | 181 #endif |
182 } | 182 } |
183 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 183 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
184 RenderProcessImpl render_process; | 184 RenderProcessImpl render_process; |
185 RenderThreadImpl::Create(main_message_loop.Pass(), | 185 RenderThreadImpl::Create(main_message_loop.Pass(), |
186 renderer_scheduler.Pass()); | 186 renderer_scheduler.Pass()); |
(...skipping 14 matching lines...) Expand all Loading... |
201 // ignore shutdown-only leaks. | 201 // ignore shutdown-only leaks. |
202 __lsan_do_leak_check(); | 202 __lsan_do_leak_check(); |
203 #endif | 203 #endif |
204 } | 204 } |
205 platform.PlatformUninitialize(); | 205 platform.PlatformUninitialize(); |
206 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 206 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
207 return 0; | 207 return 0; |
208 } | 208 } |
209 | 209 |
210 } // namespace content | 210 } // namespace content |
OLD | NEW |