Author: [EMAIL PROTECTED]
Date: Wed Nov 19 02:09:21 2008
New Revision: 792
Modified:
branches/bleeding_edge/tools/test.py
Log:
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
Modified: branches/bleeding_edge/tools/test.py
==============================================================================
--- branches/bleeding_edge/tools/test.py (original)
+++ branches/bleeding_edge/tools/test.py Wed Nov 19 02:09:21 2008
@@ -417,8 +417,12 @@
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,
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---