refactor: simplify logic for enabling stack dumping (#15872)
ref #15785
This commit is contained in:
parent
cd8099d336
commit
62eb077f29
1 changed files with 3 additions and 12 deletions
|
@ -155,18 +155,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||||
// Logging with pid and timestamp.
|
// Logging with pid and timestamp.
|
||||||
logging::SetLogItems(true, false, true, false);
|
logging::SetLogItems(true, false, true, false);
|
||||||
|
|
||||||
// Enable convient stack printing.
|
// Enable convient stack printing. This is enabled by default in non-official
|
||||||
#if defined(DEBUG) && defined(OS_LINUX)
|
// builds.
|
||||||
bool enable_stack_dumping = true;
|
if (env->HasVar("ELECTRON_ENABLE_STACK_DUMPING"))
|
||||||
#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)
|
|
||||||
base::debug::EnableInProcessStackDumping();
|
base::debug::EnableInProcessStackDumping();
|
||||||
|
|
||||||
chrome::RegisterPathProvider();
|
chrome::RegisterPathProvider();
|
||||||
|
|
Loading…
Reference in a new issue