From: Cheng Zhao Date: Tue, 19 Nov 2013 13:36:18 +0000 (+0800) Subject: Cause a real crash instead of debugger break in process.crash(). X-Git-Tag: v0.7.0~1^2~23 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2228184066d5b5fae6d9ef3382adc7e5c8f5f9e2;p=electron.git Cause a real crash instead of debugger break in process.crash(). On Windows the debugger break would not be treated as crash. --- diff --git a/common/api/atom_bindings.cc b/common/api/atom_bindings.cc index 3216232a..d86698df 100644 --- a/common/api/atom_bindings.cc +++ b/common/api/atom_bindings.cc @@ -4,7 +4,6 @@ #include "common/api/atom_bindings.h" -#include "base/debug/debugger.h" #include "base/logging.h" #include "common/atom_version.h" #include "common/v8_conversions.h" @@ -18,6 +17,8 @@ static int kMaxCallStackSize = 200; // Same with WebKit. static uv_async_t dummy_uv_handle; +struct DummyClass { bool crash; }; + void UvNoOp(uv_async_t* handle, int status) { } @@ -110,7 +111,7 @@ v8::Handle AtomBindings::Binding(const v8::Arguments& args) { // static v8::Handle AtomBindings::Crash(const v8::Arguments& args) { - base::debug::BreakDebugger(); + static_cast(NULL)->crash = true; return v8::Undefined(); }