Commit 8b45db89 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Changed the handling of Win32 function SetErrorMode to be more correct. The...

Changed the handling of Win32 function SetErrorMode to be more correct. The flag to prevent error dialogs is now merged with existing flags, and the error mode is now reset which it was not before.
Review URL: http://codereview.chromium.org/11471

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d54583f1
......@@ -417,8 +417,12 @@ def RunProcess(context, timeout, args, **rest):
if utils.IsWindows():
popen_args = '"' + subprocess.list2cmdline(args) + '"'
if context.suppress_dialogs:
# Try to change the error mode to avoid dialogs on fatal errors.
Win32SetErrorMode(SEM_NOGPFAULTERRORBOX)
# Try to change the error mode to avoid dialogs on fatal errors. Don't
# touch any existing error mode flags by merging the existing error mode.
# See http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx.
error_mode = SEM_NOGPFAULTERRORBOX;
prev_error_mode = Win32SetErrorMode(error_mode);
Win32SetErrorMode(error_mode | prev_error_mode);
process = subprocess.Popen(
shell = utils.IsWindows(),
args = popen_args,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment