зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1206987 - Only disable the GPF dialog during testing; r=sfink
--HG-- extra : rebase_source : 24779b325030ac836b4b11ff4f0577cc02dd2178
This commit is contained in:
Родитель
67f02040d6
Коммит
bc130fa093
|
@ -6352,11 +6352,14 @@ 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);
|
||||
const char* crash_option = getenv("XRE_NO_WINDOWS_CRASH_DIALOG");
|
||||
if (crash_option && strncmp(crash_option, "1", 1)) {
|
||||
// Disable the segfault dialog. We want to fail the tests immediately
|
||||
// instead of hanging automation.
|
||||
UINT newMode = SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;
|
||||
UINT prevMode = SetErrorMode(newMode);
|
||||
SetErrorMode(prevMode | newMode);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -6371,15 +6374,6 @@ main(int argc, char** argv, char** envp)
|
|||
JSRuntime* rt;
|
||||
JSContext* cx;
|
||||
int result;
|
||||
#ifdef XP_WIN
|
||||
{
|
||||
const char* crash_option = getenv("XRE_NO_WINDOWS_CRASH_DIALOG");
|
||||
if (crash_option && strncmp(crash_option, "1", 1)) {
|
||||
DWORD oldmode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
|
||||
SetErrorMode(oldmode | SEM_NOGPFAULTERRORBOX);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
setlocale(LC_ALL, "");
|
||||
|
|
|
@ -57,6 +57,8 @@ def get_environment_overlay(js_shell):
|
|||
'TZ': 'PST8PDT',
|
||||
# Force date strings to English.
|
||||
'LC_TIME': 'en_US.UTF-8',
|
||||
# Tell the shell to disable crash dialogs on windows.
|
||||
'XRE_NO_WINDOWS_CRASH_DIALOG': '1',
|
||||
}
|
||||
# Add the binary's directory to the library search path so that we find the
|
||||
# nspr and icu we built, instead of the platform supplied ones (or none at
|
||||
|
|
Загрузка…
Ссылка в новой задаче