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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 9803002: [windows] Make calls to exit(), _exit(), abort(), and ExitProcess() from the renderer process resul… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
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 "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/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/metrics/stats_counters.h" 14 #include "base/metrics/stats_counters.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/process_util.h" 16 #include "base/process_util.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/system_monitor/system_monitor.h" 18 #include "base/system_monitor/system_monitor.h"
19 #include "base/threading/platform_thread.h" 19 #include "base/threading/platform_thread.h"
20 #include "base/time.h" 20 #include "base/time.h"
21 #include "chrome/common/child_process_logging.h"
rvargas (doing something else) 2012/03/21 03:13:45 content cannot depend on chrome
21 #include "content/common/content_counters.h" 22 #include "content/common/content_counters.h"
22 #include "content/common/hi_res_timer_manager.h" 23 #include "content/common/hi_res_timer_manager.h"
23 #include "content/common/pepper_plugin_registry.h" 24 #include "content/common/pepper_plugin_registry.h"
24 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
25 #include "content/public/common/main_function_params.h" 26 #include "content/public/common/main_function_params.h"
26 #include "content/public/renderer/content_renderer_client.h" 27 #include "content/public/renderer/content_renderer_client.h"
27 #include "content/renderer/render_process_impl.h" 28 #include "content/renderer/render_process_impl.h"
28 #include "content/renderer/render_thread_impl.h" 29 #include "content/renderer/render_thread_impl.h"
29 #include "content/renderer/renderer_main_platform_delegate.h" 30 #include "content/renderer/renderer_main_platform_delegate.h"
30 #include "ui/base/ui_base_switches.h" 31 #include "ui/base/ui_base_switches.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 private: 124 private:
124 base::TimeTicks begin_process_message_; 125 base::TimeTicks begin_process_message_;
125 base::Histogram* const process_times_; 126 base::Histogram* const process_times_;
126 DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver); 127 DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver);
127 }; 128 };
128 129
129 // mainline routine for running as the Renderer process 130 // mainline routine for running as the Renderer process
130 int RendererMain(const content::MainFunctionParams& parameters) { 131 int RendererMain(const content::MainFunctionParams& parameters) {
131 TRACE_EVENT_BEGIN_ETW("RendererMain", 0, ""); 132 TRACE_EVENT_BEGIN_ETW("RendererMain", 0, "");
132 133
134 child_process_logging::SetCrashOnExit(true);
135
133 const CommandLine& parsed_command_line = parameters.command_line; 136 const CommandLine& parsed_command_line = parameters.command_line;
134 137
135 #if defined(OS_MACOSX) 138 #if defined(OS_MACOSX)
136 base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool; 139 base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool;
137 InstallFrameworkHacks(); 140 InstallFrameworkHacks();
138 #endif // OS_MACOSX 141 #endif // OS_MACOSX
139 142
140 #if defined(OS_CHROMEOS) 143 #if defined(OS_CHROMEOS)
141 // As Zygote process starts up earlier than browser process gets its own 144 // As Zygote process starts up earlier than browser process gets its own
142 // locale (at login time for Chrome OS), we have to set the ICU default 145 // locale (at login time for Chrome OS), we have to set the ICU default
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 #if defined(OS_MACOSX) 239 #if defined(OS_MACOSX)
237 if (pool) 240 if (pool)
238 pool->Recycle(); 241 pool->Recycle();
239 #endif 242 #endif
240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); 243 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0);
241 MessageLoop::current()->Run(); 244 MessageLoop::current()->Run();
242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 245 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
243 } 246 }
244 } 247 }
245 platform.PlatformUninitialize(); 248 platform.PlatformUninitialize();
249
250 child_process_logging::SetCrashOnExit(false);
251
246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 252 TRACE_EVENT_END_ETW("RendererMain", 0, "");
247 return 0; 253 return 0;
248 } 254 }
OLDNEW
« chrome/common/child_process_logging.h ('K') | « chrome/common/child_process_logging_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698