From c2b109f7fca5abfdeec4849d0a6c026786d52094 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 23 Jan 2015 21:55:42 -0800 Subject: [PATCH] Fix process.crash() --- atom/common/api/atom_bindings.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index f6eed1e1..ed33dab6 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -11,7 +11,6 @@ #include "atom/common/chrome_version.h" #include "atom/common/native_mate_converters/string16_converter.h" #include "base/logging.h" -#include "base/debug/debugger.h" #include "native_mate/dictionary.h" #include "atom/common/node_includes.h" @@ -20,8 +19,11 @@ namespace atom { namespace { +// Dummy class type that used for crashing the program. +struct DummyClass { bool crash; }; + void Crash() { - base::debug::BreakDebugger(); + static_cast(NULL)->crash = true; } // Called when there is a fatal error in V8, we just crash the process here so -- 2.43.0