static_cast<DummyClass*>(NULL)->crash = true;
}
+void Hang() {
+ for (;;)
+ base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1));
+}
+
// Called when there is a fatal error in V8, we just crash the process here so
// we can get the stack trace.
void FatalErrorCallback(const char* location, const char* message) {
mate::Dictionary dict(isolate, process);
dict.SetMethod("crash", &Crash);
+ dict.SetMethod("hang", &Hang);
dict.SetMethod("log", &Log);
dict.SetMethod("activateUvLoop",
base::Bind(&AtomBindings::ActivateUVLoop, base::Unretained(this)));
* `process.versions['electron']` String - Version of Electron.
* `process.versions['chrome']` String - Version of Chromium.
* `process.resourcesPath` String - Path to JavaScript source code.
+
+## process.hang
+
+Causes the main thread of the current process hang.