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

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

Issue 1284083002: Print stack traces in child processes when browser tests failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes 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"
13 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
14 #include "base/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
15 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
16 #include "base/logging.h" 17 #include "base/logging.h"
17 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
18 #include "base/memory/scoped_vector.h" 19 #include "base/memory/scoped_vector.h"
19 #include "base/metrics/statistics_recorder.h" 20 #include "base/metrics/statistics_recorder.h"
20 #include "base/path_service.h" 21 #include "base/path_service.h"
21 #include "base/process/launch.h" 22 #include "base/process/launch.h"
22 #include "base/process/memory.h" 23 #include "base/process/memory.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // Various things break when you're using a locale where the decimal 189 // Various things break when you're using a locale where the decimal
189 // separator isn't a period. See e.g. bugs 22782 and 39964. For 190 // separator isn't a period. See e.g. bugs 22782 and 39964. For
190 // all processes except the browser process (where we call system 191 // all processes except the browser process (where we call system
191 // APIs that may rely on the correct locale for formatting numbers 192 // APIs that may rely on the correct locale for formatting numbers
192 // when presenting them to the user), reset the locale for numeric 193 // when presenting them to the user), reset the locale for numeric
193 // formatting. 194 // formatting.
194 // Note that this is not correct for plugin processes -- they can 195 // Note that this is not correct for plugin processes -- they can
195 // surface UI -- but it's likely they get this wrong too so why not. 196 // surface UI -- but it's likely they get this wrong too so why not.
196 setlocale(LC_NUMERIC, "C"); 197 setlocale(LC_NUMERIC, "C");
197 #endif 198 #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
198 } 208 }
199 209
200 class ContentClientInitializer { 210 class ContentClientInitializer {
201 public: 211 public:
202 static void Set(const std::string& process_type, 212 static void Set(const std::string& process_type,
203 ContentMainDelegate* delegate) { 213 ContentMainDelegate* delegate) {
204 ContentClient* content_client = GetContentClient(); 214 ContentClient* content_client = GetContentClient();
205 #if !defined(CHROME_MULTIPLE_DLL_CHILD) 215 #if !defined(CHROME_MULTIPLE_DLL_CHILD)
206 if (process_type.empty()) { 216 if (process_type.empty()) {
207 if (delegate) 217 if (delegate)
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 861
852 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 862 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
853 }; 863 };
854 864
855 // static 865 // static
856 ContentMainRunner* ContentMainRunner::Create() { 866 ContentMainRunner* ContentMainRunner::Create() {
857 return new ContentMainRunnerImpl(); 867 return new ContentMainRunnerImpl();
858 } 868 }
859 869
860 } // namespace content 870 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/data/webui/net_internals/sdch_view.js ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698