Bug 1170665 - Disable the windows segfault popup in the shell; r=jandem

This commit is contained in:
Terrence Cole 2015-06-02 11:40:46 -07:00
parent 59e2c724c7
commit 39af4158f0

View File

@ -6065,9 +6065,23 @@ DummyPreserveWrapperCallback(JSContext* cx, JSObject* obj)
return true;
}
static void
PreInit()
{
#ifdef XP_WIN
// Disable the segfault dialog. We want to fail the tests immediately
// instead of hanging automation.
UINT prevMode = SetErrorMode(0);
UINT newMode = SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;
SetErrorMode(prevMode | newMode);
#endif
}
int
main(int argc, char** argv, char** envp)
{
PreInit();
sArgc = argc;
sArgv = argv;