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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1299583002: Revert of Print stack traces in child processes when browser tests failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/debugger.h" 12 #include "base/debug/debugger.h"
13 #include "base/debug/stack_trace.h"
14 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
15 #include "base/i18n/icu_util.h" 14 #include "base/i18n/icu_util.h"
16 #include "base/lazy_instance.h" 15 #include "base/lazy_instance.h"
17 #include "base/logging.h" 16 #include "base/logging.h"
18 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/scoped_vector.h" 18 #include "base/memory/scoped_vector.h"
20 #include "base/metrics/statistics_recorder.h" 19 #include "base/metrics/statistics_recorder.h"
21 #include "base/path_service.h" 20 #include "base/path_service.h"
22 #include "base/process/launch.h" 21 #include "base/process/launch.h"
23 #include "base/process/memory.h" 22 #include "base/process/memory.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Various things break when you're using a locale where the decimal 188 // Various things break when you're using a locale where the decimal
190 // separator isn't a period. See e.g. bugs 22782 and 39964. For 189 // separator isn't a period. See e.g. bugs 22782 and 39964. For
191 // all processes except the browser process (where we call system 190 // all processes except the browser process (where we call system
192 // APIs that may rely on the correct locale for formatting numbers 191 // APIs that may rely on the correct locale for formatting numbers
193 // when presenting them to the user), reset the locale for numeric 192 // when presenting them to the user), reset the locale for numeric
194 // formatting. 193 // formatting.
195 // Note that this is not correct for plugin processes -- they can 194 // Note that this is not correct for plugin processes -- they can
196 // surface UI -- but it's likely they get this wrong too so why not. 195 // surface UI -- but it's likely they get this wrong too so why not.
197 setlocale(LC_NUMERIC, "C"); 196 setlocale(LC_NUMERIC, "C");
198 #endif 197 #endif
199
200 #if !defined(OFFICIAL_BUILD)
201 // Print stack traces to stderr when crashes occur. This opens up security
202 // holes so it should never be enabled for official builds.
203 base::debug::EnableInProcessStackDumping();
204 #if defined(OS_WIN)
205 LoadLibraryA("dbghelp.dll");
206 #endif
207 #endif
208 } 198 }
209 199
210 class ContentClientInitializer { 200 class ContentClientInitializer {
211 public: 201 public:
212 static void Set(const std::string& process_type, 202 static void Set(const std::string& process_type,
213 ContentMainDelegate* delegate) { 203 ContentMainDelegate* delegate) {
214 ContentClient* content_client = GetContentClient(); 204 ContentClient* content_client = GetContentClient();
215 #if !defined(CHROME_MULTIPLE_DLL_CHILD) 205 #if !defined(CHROME_MULTIPLE_DLL_CHILD)
216 if (process_type.empty()) { 206 if (process_type.empty()) {
217 if (delegate) 207 if (delegate)
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 851
862 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 852 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
863 }; 853 };
864 854
865 // static 855 // static
866 ContentMainRunner* ContentMainRunner::Create() { 856 ContentMainRunner* ContentMainRunner::Create() {
867 return new ContentMainRunnerImpl(); 857 return new ContentMainRunnerImpl();
868 } 858 }
869 859
870 } // namespace content 860 } // namespace content
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_main_platform_delegate_win.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698