#include "atom/common/node_includes.h"
#include "base/command_line.h"
#include "base/base_paths.h"
+#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
// Init node.
// (we assume node::Init would not modify the parameters under embedded mode).
node::Init(nullptr, nullptr, nullptr, nullptr);
+
+#if defined(OS_WIN)
+ // uv_init overrides error mode to suppress the default crash dialog, bring
+ // it back if user wants to show it.
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ if (env->HasVar("ELECTRON_DEFAULT_ERROR_MODE"))
+ SetErrorMode(0);
+#endif
}
node::Environment* NodeBindings::CreateEnvironment(