| Index: test/cctest/cctest.cc
|
| diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc
|
| index 2bb08b0ec946ff517371054ef656a56ff6ab6ea3..3eb189f409c509589651dd5fb1f728511b24a894 100644
|
| --- a/test/cctest/cctest.cc
|
| +++ b/test/cctest/cctest.cc
|
| @@ -34,6 +34,13 @@
|
| #include "test/cctest/profiler-extension.h"
|
| #include "test/cctest/trace-extension.h"
|
|
|
| +#if (defined(_WIN32) || defined(_WIN64))
|
| +#include <windows.h> // NOLINT
|
| +#if defined(_MSC_VER)
|
| +#include <crtdbg.h>
|
| +#endif // defined(_MSC_VER)
|
| +#endif // defined(_WIN32) || defined(_WIN64)
|
| +
|
| enum InitializationState {kUnset, kUnintialized, kInitialized};
|
| static InitializationState initialization_state_ = kUnset;
|
| static bool disable_automatic_dispose_ = false;
|
| @@ -138,6 +145,22 @@ static void SuggestTestHarness(int tests) {
|
|
|
|
|
| int main(int argc, char* argv[]) {
|
| +#if (defined(_WIN32) || defined(_WIN64))
|
| + UINT new_flags =
|
| + SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;
|
| + UINT existing_flags = SetErrorMode(new_flags);
|
| + SetErrorMode(existing_flags | new_flags);
|
| +#if defined(_MSC_VER)
|
| + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
|
| + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
|
| + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
|
| + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
|
| + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
|
| + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
|
| + _set_error_mode(_OUT_TO_STDERR);
|
| +#endif // _MSC_VER
|
| +#endif // defined(_WIN32) || defined(_WIN64)
|
| +
|
| v8::V8::InitializeICU();
|
| v8::Platform* platform = v8::platform::CreateDefaultPlatform();
|
| v8::V8::InitializePlatform(platform);
|
|
|