Add process.crash() for both browser and renderer.
This commit is contained in:
parent
cd42fcceb9
commit
cbb467032d
2 changed files with 8 additions and 0 deletions
|
@ -22,6 +22,7 @@ void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
|
||||||
v8::HandleScope scope;
|
v8::HandleScope scope;
|
||||||
|
|
||||||
node::SetMethod(process, "atomBinding", Binding);
|
node::SetMethod(process, "atomBinding", Binding);
|
||||||
|
node::SetMethod(process, "crash", Crash);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -71,4 +72,10 @@ v8::Handle<v8::Value> AtomBindings::Binding(const v8::Arguments& args) {
|
||||||
v8::String::New("No such module")));
|
v8::String::New("No such module")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
v8::Handle<v8::Value> AtomBindings::Crash(const v8::Arguments& args) {
|
||||||
|
__builtin_trap();
|
||||||
|
return v8::Undefined();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -21,6 +21,7 @@ class AtomBindings {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static v8::Handle<v8::Value> Binding(const v8::Arguments& args);
|
static v8::Handle<v8::Value> Binding(const v8::Arguments& args);
|
||||||
|
static v8::Handle<v8::Value> Crash(const v8::Arguments& args);
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(AtomBindings);
|
DISALLOW_COPY_AND_ASSIGN(AtomBindings);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue