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

Side by Side Diff: test/cctest/cctest.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Addressing some of Jochen's feedback Created 3 years, 11 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
OLDNEW
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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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/trap-handler/trap-handler.h"
33 #include "test/cctest/print-extension.h" 34 #include "test/cctest/print-extension.h"
34 #include "test/cctest/profiler-extension.h" 35 #include "test/cctest/profiler-extension.h"
35 #include "test/cctest/trace-extension.h" 36 #include "test/cctest/trace-extension.h"
36 37
37 #if V8_OS_WIN 38 #if V8_OS_WIN
38 #include <windows.h> // NOLINT 39 #include <windows.h> // NOLINT
39 #if V8_CC_MSVC 40 #if V8_CC_MSVC
40 #include <crtdbg.h> 41 #include <crtdbg.h>
41 #endif 42 #endif
42 #endif 43 #endif
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 261 }
261 } 262 }
262 263
263 v8::V8::InitializeICUDefaultLocation(argv[0]); 264 v8::V8::InitializeICUDefaultLocation(argv[0]);
264 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); 265 v8::Platform* platform = v8::platform::CreateDefaultPlatform();
265 v8::V8::InitializePlatform(platform); 266 v8::V8::InitializePlatform(platform);
266 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); 267 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
267 v8::V8::Initialize(); 268 v8::V8::Initialize();
268 v8::V8::InitializeExternalStartupData(argv[0]); 269 v8::V8::InitializeExternalStartupData(argv[0]);
269 270
271 if (i::trap_handler::EnableTrapHandler()) {
272 v8::V8::RegisterDefaultSignalHandler();
273 }
274
270 CcTestArrayBufferAllocator array_buffer_allocator; 275 CcTestArrayBufferAllocator array_buffer_allocator;
271 CcTest::set_array_buffer_allocator(&array_buffer_allocator); 276 CcTest::set_array_buffer_allocator(&array_buffer_allocator);
272 277
273 i::PrintExtension print_extension; 278 i::PrintExtension print_extension;
274 v8::RegisterExtension(&print_extension); 279 v8::RegisterExtension(&print_extension);
275 i::ProfilerExtension profiler_extension; 280 i::ProfilerExtension profiler_extension;
276 v8::RegisterExtension(&profiler_extension); 281 v8::RegisterExtension(&profiler_extension);
277 i::TraceExtension trace_extension; 282 i::TraceExtension trace_extension;
278 v8::RegisterExtension(&trace_extension); 283 v8::RegisterExtension(&trace_extension);
279 284
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 CcTest::TearDown(); 332 CcTest::TearDown();
328 // TODO(svenpanne) See comment above. 333 // TODO(svenpanne) See comment above.
329 // if (!disable_automatic_dispose_) v8::V8::Dispose(); 334 // if (!disable_automatic_dispose_) v8::V8::Dispose();
330 v8::V8::ShutdownPlatform(); 335 v8::V8::ShutdownPlatform();
331 delete platform; 336 delete platform;
332 return 0; 337 return 0;
333 } 338 }
334 339
335 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; 340 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL;
336 int RegisterThreadedTest::count_ = 0; 341 int RegisterThreadedTest::count_ = 0;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698