Index: media/tools/media_bench/media_bench.cc |
=================================================================== |
--- media/tools/media_bench/media_bench.cc (revision 50665) |
+++ media/tools/media_bench/media_bench.cc (working copy) |
@@ -49,8 +49,14 @@ |
} // namespace switches |
#if defined(OS_WIN) |
+ |
+// Enable to build with exception handler |
+//#define ENABLE_WINDOWS_EXCEPTIONS 1 |
+ |
+#ifdef ENABLE_WINDOWS_EXCEPTIONS |
// warning: disable warning about exception handler. |
#pragma warning(disable:4509) |
+#endif |
// Thread priorities to make benchmark more stable. |
@@ -209,7 +215,7 @@ |
} |
std::ostream* log_out = &std::cout; |
-#if defined(OS_WIN) |
+#if defined(ENABLE_WINDOWS_EXCEPTIONS) |
// Catch exceptions so this tool can be used in automated testing. |
__try { |
#endif |
@@ -554,7 +560,7 @@ |
*log_out << " MD5 Hash: " << MD5DigestToBase16(digest) |
<< " " << in_path << std::endl; |
} |
-#if defined(OS_WIN) |
+#if defined(ENABLE_WINDOWS_EXCEPTIONS) |
} __except(EXCEPTION_EXECUTE_HANDLER) { |
*log_out << " Exception:" << std::setw(11) << GetExceptionCode() |
<< " " << in_path << std::endl; |