Cause a real crash instead of debugger break in process.crash().
On Windows the debugger break would not be treated as crash.
This commit is contained in:
parent
1af4ecfc26
commit
2228184066
1 changed files with 3 additions and 2 deletions
|
@ -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<v8::Value> AtomBindings::Binding(const v8::Arguments& args) {
|
|||
|
||||
// static
|
||||
v8::Handle<v8::Value> AtomBindings::Crash(const v8::Arguments& args) {
|
||||
base::debug::BreakDebugger();
|
||||
static_cast<DummyClass*>(NULL)->crash = true;
|
||||
return v8::Undefined();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue