Add crashReporter property to process

This commit is contained in:
Ramya Achutha Rao 2016-12-09 01:44:12 -08:00 committed by Kevin Sawicki
parent d4b44d8b69
commit 1f07cf2545
4 changed files with 22 additions and 19 deletions

View file

@ -62,9 +62,13 @@ int NodeMain(int argc, char *argv[]) {
#if defined(OS_WIN)
process.SetMethod("log", &AtomBindings::Log);
#endif
process.SetMethod("startCrashReporter", &AtomBindings::StartCrashReporter);
process.SetMethod("crash", &AtomBindings::Crash);
v8::Local<v8::Object> crashReporterObj = v8::Object::New(env->isolate());
mate::Dictionary crashReporterDict(gin_env.isolate(), crashReporterObj);
crashReporterDict.SetMethod("start", &AtomBindings::StartCrashReporter);
process.Set("crashReporter", crashReporterObj);
node::LoadEnvironment(env);
bool more;