Skip to content

Commit

Permalink
refactor: simplify logic for enabling stack dumping (#15872)
Browse files Browse the repository at this point in the history
ref #15785
  • Loading branch information
nornagon committed Nov 29, 2018
1 parent cd8099d commit 62eb077
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions atom/app/atom_main_delegate.cc
Expand Up @@ -155,18 +155,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
// Logging with pid and timestamp.
logging::SetLogItems(true, false, true, false);

// Enable convient stack printing.
#if defined(DEBUG) && defined(OS_LINUX)
bool enable_stack_dumping = true;
#else
bool enable_stack_dumping = env->HasVar("ELECTRON_ENABLE_STACK_DUMPING");
#endif
#if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS)
// For 32bit ARM enabling stack printing would end up crashing.
// https://github.com/electron/electron/pull/11230#issuecomment-363232482
enable_stack_dumping = false;
#endif
if (enable_stack_dumping)
// Enable convient stack printing. This is enabled by default in non-official
// builds.
if (env->HasVar("ELECTRON_ENABLE_STACK_DUMPING"))
base::debug::EnableInProcessStackDumping();

chrome::RegisterPathProvider();
Expand Down

0 comments on commit 62eb077

Please sign in to comment.