"projects/git@developer.sourcefind.cn:tsoc/hg-misc-tools.git" did not exist on "c0285d0b0d8f344e96f06ce295f39776b5477c0c"
Commit e4942905 authored by Tanzinul Islam's avatar Tanzinul Islam
Browse files

Allow death test child to bypass WER under MinGW

The mechanics of suppressing debugger trapping and Windows Error Reporting for the crashed child process in a death test are currently guarded under the `GTEST_HAS_SEH` macro. This seems unnecessary, as the logic does not call any APIs related to Structured Error Handling.

Replace the guarding macro with the more permissive `GTEST_OS_WINDOWS`, so that Windows toolchains without SEH support (e.g. MinGW) can benefit from it.

Fixes: #1116
parent c2d90bdd
...@@ -4214,7 +4214,7 @@ int UnitTest::Run() { ...@@ -4214,7 +4214,7 @@ int UnitTest::Run() {
// used for the duration of the program. // used for the duration of the program.
impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions)); impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));
#if GTEST_HAS_SEH #if GTEST_OS_WINDOWS
// Either the user wants Google Test to catch exceptions thrown by the // Either the user wants Google Test to catch exceptions thrown by the
// tests or this is executing in the context of death test child // tests or this is executing in the context of death test child
// process. In either case the user does not want to see pop-up dialogs // process. In either case the user does not want to see pop-up dialogs
...@@ -4251,7 +4251,7 @@ int UnitTest::Run() { ...@@ -4251,7 +4251,7 @@ int UnitTest::Run() {
_WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump.
# endif # endif
} }
#endif // GTEST_HAS_SEH #endif // GTEST_OS_WINDOWS
return internal::HandleExceptionsInMethodIfSupported( return internal::HandleExceptionsInMethodIfSupported(
impl(), impl(),
......
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