Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/d8.cc

Issue 575473002: Configure d8 & cctest to suppress Windows error dialogs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add NOLINT to includes. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/cctest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "src/base/platform/platform.h" 47 #include "src/base/platform/platform.h"
48 #include "src/base/sys-info.h" 48 #include "src/base/sys-info.h"
49 #include "src/d8-debug.h" 49 #include "src/d8-debug.h"
50 #include "src/debug.h" 50 #include "src/debug.h"
51 #include "src/natives.h" 51 #include "src/natives.h"
52 #include "src/v8.h" 52 #include "src/v8.h"
53 #endif // !V8_SHARED 53 #endif // !V8_SHARED
54 54
55 #if !defined(_WIN32) && !defined(_WIN64) 55 #if !defined(_WIN32) && !defined(_WIN64)
56 #include <unistd.h> // NOLINT 56 #include <unistd.h> // NOLINT
57 #else
58 #include <windows.h> // NOLINT
57 #endif 59 #endif
58 60
59 #ifndef DCHECK 61 #ifndef DCHECK
60 #define DCHECK(condition) assert(condition) 62 #define DCHECK(condition) assert(condition)
61 #endif 63 #endif
62 64
63 namespace v8 { 65 namespace v8 {
64 66
65 67
66 static Handle<Value> Throw(Isolate* isolate, const char* message) { 68 static Handle<Value> Throw(Isolate* isolate, const char* message) {
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 v8::StartupData snapshot_; 1590 v8::StartupData snapshot_;
1589 1591
1590 // Disallow copy & assign. 1592 // Disallow copy & assign.
1591 StartupDataHandler(const StartupDataHandler& other); 1593 StartupDataHandler(const StartupDataHandler& other);
1592 void operator=(const StartupDataHandler& other); 1594 void operator=(const StartupDataHandler& other);
1593 }; 1595 };
1594 #endif // V8_USE_EXTERNAL_STARTUP_DATA 1596 #endif // V8_USE_EXTERNAL_STARTUP_DATA
1595 1597
1596 1598
1597 int Shell::Main(int argc, char* argv[]) { 1599 int Shell::Main(int argc, char* argv[]) {
1600 #if (defined(_WIN32) || defined(_WIN64))
1601 UINT new_flags =
1602 SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;
1603 UINT existing_flags = SetErrorMode(new_flags);
1604 SetErrorMode(existing_flags | new_flags);
1605 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
1606 _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
1607 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
1608 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
1609 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
1610 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
1611 _set_error_mode(_OUT_TO_STDERR);
1612 #endif
1598 if (!SetOptions(argc, argv)) return 1; 1613 if (!SetOptions(argc, argv)) return 1;
1599 v8::V8::InitializeICU(options.icu_data_file); 1614 v8::V8::InitializeICU(options.icu_data_file);
1600 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); 1615 v8::Platform* platform = v8::platform::CreateDefaultPlatform();
1601 v8::V8::InitializePlatform(platform); 1616 v8::V8::InitializePlatform(platform);
1602 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 1617 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
1603 StartupDataHandler startup_data(options.natives_blob, options.snapshot_blob); 1618 StartupDataHandler startup_data(options.natives_blob, options.snapshot_blob);
1604 #endif 1619 #endif
1605 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); 1620 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg");
1606 SetFlagsFromString("--redirect-code-traces-to=code.asm"); 1621 SetFlagsFromString("--redirect-code-traces-to=code.asm");
1607 ShellArrayBufferAllocator array_buffer_allocator; 1622 ShellArrayBufferAllocator array_buffer_allocator;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 } 1706 }
1692 1707
1693 } // namespace v8 1708 } // namespace v8
1694 1709
1695 1710
1696 #ifndef GOOGLE3 1711 #ifndef GOOGLE3
1697 int main(int argc, char* argv[]) { 1712 int main(int argc, char* argv[]) {
1698 return v8::Shell::Main(argc, argv); 1713 return v8::Shell::Main(argc, argv);
1699 } 1714 }
1700 #endif 1715 #endif
OLDNEW
« no previous file with comments | « no previous file | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698