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

Unified Diff: mojo/runner/host/child_process.cc

Issue 1492523002: mojo: Improve crash stack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 side-by-side diff with in-line comments
Download patch
« mojo/runner/desktop/main_helper.cc ('K') | « mojo/runner/desktop/main_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/host/child_process.cc
diff --git a/mojo/runner/host/child_process.cc b/mojo/runner/host/child_process.cc
index f0bfd21bedaca18aa6a81f9002b3db8e64852769..0dd6d84c316a7e6d79540384ba497614ad9157a7 100644
--- a/mojo/runner/host/child_process.cc
+++ b/mojo/runner/host/child_process.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
+#include "base/debug/stack_trace.h"
#include "base/files/file_path.h"
#include "base/i18n/icu_util.h"
#include "base/location.h"
@@ -359,13 +360,18 @@ int ChildProcessMain() {
// Load the application library before we engage the sandbox.
app_library = mojo::runner::LoadNativeApplication(
command_line.GetSwitchValuePath(switches::kChildProcess));
-
base::i18n::InitializeICU();
if (app_library)
CallLibraryEarlyInitialization(app_library);
#if defined(OS_LINUX) && !defined(OS_ANDROID)
- if (command_line.HasSwitch(switches::kEnableSandbox))
+ if (command_line.HasSwitch(switches::kEnableSandbox)) {
+#if !defined(OFFICIAL_BUILD)
+ // Initialize stack dumping just before initializing sandbox to make
+ // sure symbol names in all loaded libraries will be cached.
+ base::debug::EnableInProcessStackDumping();
+#endif
sandbox = InitializeSandbox();
+ }
#endif
embedder::ScopedPlatformHandle platform_channel =
« mojo/runner/desktop/main_helper.cc ('K') | « mojo/runner/desktop/main_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698