Merge pull request #7335 from miniak/set-default-error-mode

Add process.setDefaultErrorMode()
This commit is contained in:
Cheng Zhao 2016-10-03 20:53:42 +09:00 committed by GitHub
commit 772c456513

View file

@ -144,7 +144,7 @@ void NodeBindings::Initialize() {
// uv_init overrides error mode to suppress the default crash dialog, bring
// it back if user wants to show it.
std::unique_ptr<base::Environment> env(base::Environment::Create());
if (env->HasVar("ELECTRON_DEFAULT_ERROR_MODE"))
if (is_browser_ || env->HasVar("ELECTRON_DEFAULT_ERROR_MODE"))
SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX);
#endif
}