| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "include/v8.h" | 28 #include "include/v8.h" |
| 29 #include "test/cctest/cctest.h" | 29 #include "test/cctest/cctest.h" |
| 30 | 30 |
| 31 #include "include/libplatform/libplatform.h" | 31 #include "include/libplatform/libplatform.h" |
| 32 #include "src/debug/debug.h" | 32 #include "src/debug/debug.h" |
| 33 #include "src/objects-inl.h" | 33 #include "src/objects-inl.h" |
| 34 #include "src/trap-handler/trap-handler.h" | |
| 35 #include "test/cctest/print-extension.h" | 34 #include "test/cctest/print-extension.h" |
| 36 #include "test/cctest/profiler-extension.h" | 35 #include "test/cctest/profiler-extension.h" |
| 37 #include "test/cctest/trace-extension.h" | 36 #include "test/cctest/trace-extension.h" |
| 38 | 37 |
| 39 #if V8_OS_WIN | 38 #if V8_OS_WIN |
| 40 #include <windows.h> // NOLINT | 39 #include <windows.h> // NOLINT |
| 41 #if V8_CC_MSVC | 40 #if V8_CC_MSVC |
| 42 #include <crtdbg.h> | 41 #include <crtdbg.h> |
| 43 #endif | 42 #endif |
| 44 #endif | 43 #endif |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 261 } |
| 263 } | 262 } |
| 264 | 263 |
| 265 v8::V8::InitializeICUDefaultLocation(argv[0]); | 264 v8::V8::InitializeICUDefaultLocation(argv[0]); |
| 266 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); | 265 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); |
| 267 v8::V8::InitializePlatform(platform); | 266 v8::V8::InitializePlatform(platform); |
| 268 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 267 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
| 269 v8::V8::Initialize(); | 268 v8::V8::Initialize(); |
| 270 v8::V8::InitializeExternalStartupData(argv[0]); | 269 v8::V8::InitializeExternalStartupData(argv[0]); |
| 271 | 270 |
| 272 if (i::trap_handler::UseTrapHandler()) { | |
| 273 v8::V8::RegisterDefaultSignalHandler(); | |
| 274 } | |
| 275 | |
| 276 CcTestArrayBufferAllocator array_buffer_allocator; | 271 CcTestArrayBufferAllocator array_buffer_allocator; |
| 277 CcTest::set_array_buffer_allocator(&array_buffer_allocator); | 272 CcTest::set_array_buffer_allocator(&array_buffer_allocator); |
| 278 | 273 |
| 279 i::PrintExtension print_extension; | 274 i::PrintExtension print_extension; |
| 280 v8::RegisterExtension(&print_extension); | 275 v8::RegisterExtension(&print_extension); |
| 281 i::ProfilerExtension profiler_extension; | 276 i::ProfilerExtension profiler_extension; |
| 282 v8::RegisterExtension(&profiler_extension); | 277 v8::RegisterExtension(&profiler_extension); |
| 283 i::TraceExtension trace_extension; | 278 i::TraceExtension trace_extension; |
| 284 v8::RegisterExtension(&trace_extension); | 279 v8::RegisterExtension(&trace_extension); |
| 285 | 280 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 CcTest::TearDown(); | 328 CcTest::TearDown(); |
| 334 // TODO(svenpanne) See comment above. | 329 // TODO(svenpanne) See comment above. |
| 335 // if (!disable_automatic_dispose_) v8::V8::Dispose(); | 330 // if (!disable_automatic_dispose_) v8::V8::Dispose(); |
| 336 v8::V8::ShutdownPlatform(); | 331 v8::V8::ShutdownPlatform(); |
| 337 delete platform; | 332 delete platform; |
| 338 return 0; | 333 return 0; |
| 339 } | 334 } |
| 340 | 335 |
| 341 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; | 336 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; |
| 342 int RegisterThreadedTest::count_ = 0; | 337 int RegisterThreadedTest::count_ = 0; |
| OLD | NEW |