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

Side by Side Diff: src/api.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Restore signal mask at the right place Created 3 years, 10 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 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 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "src/property.h" 60 #include "src/property.h"
61 #include "src/prototype.h" 61 #include "src/prototype.h"
62 #include "src/runtime-profiler.h" 62 #include "src/runtime-profiler.h"
63 #include "src/runtime/runtime.h" 63 #include "src/runtime/runtime.h"
64 #include "src/simulator.h" 64 #include "src/simulator.h"
65 #include "src/snapshot/code-serializer.h" 65 #include "src/snapshot/code-serializer.h"
66 #include "src/snapshot/natives.h" 66 #include "src/snapshot/natives.h"
67 #include "src/snapshot/snapshot.h" 67 #include "src/snapshot/snapshot.h"
68 #include "src/startup-data-util.h" 68 #include "src/startup-data-util.h"
69 #include "src/tracing/trace-event.h" 69 #include "src/tracing/trace-event.h"
70 #include "src/trap-handler/trap-handler.h"
70 #include "src/unicode-inl.h" 71 #include "src/unicode-inl.h"
71 #include "src/v8.h" 72 #include "src/v8.h"
72 #include "src/v8threads.h" 73 #include "src/v8threads.h"
73 #include "src/value-serializer.h" 74 #include "src/value-serializer.h"
74 #include "src/version.h" 75 #include "src/version.h"
75 #include "src/vm-state-inl.h" 76 #include "src/vm-state-inl.h"
76 #include "src/wasm/wasm-module.h" 77 #include "src/wasm/wasm-module.h"
77 #include "src/wasm/wasm-objects.h" 78 #include "src/wasm/wasm-objects.h"
78 #include "src/wasm/wasm-result.h" 79 #include "src/wasm/wasm-result.h"
79 80
(...skipping 6034 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 6115
6115 6116
6116 bool v8::V8::Initialize() { 6117 bool v8::V8::Initialize() {
6117 i::V8::Initialize(); 6118 i::V8::Initialize();
6118 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 6119 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
6119 i::ReadNatives(); 6120 i::ReadNatives();
6120 #endif 6121 #endif
6121 return true; 6122 return true;
6122 } 6123 }
6123 6124
6125 #if V8_OS_LINUX && V8_TARGET_ARCH_X64
6126 bool V8::TryHandleSignal(int signum, void* info, void* context) {
6127 return v8::internal::trap_handler::TryHandleSignal(
6128 signum, static_cast<siginfo_t*>(info), static_cast<ucontext_t*>(context));
6129 }
6130 #endif // V8_OS_LINUX
6131
6132 bool V8::RegisterDefaultSignalHandler() {
6133 return v8::internal::trap_handler::RegisterDefaultSignalHandler();
6134 }
6124 6135
6125 void v8::V8::SetEntropySource(EntropySource entropy_source) { 6136 void v8::V8::SetEntropySource(EntropySource entropy_source) {
6126 base::RandomNumberGenerator::SetEntropySource(entropy_source); 6137 base::RandomNumberGenerator::SetEntropySource(entropy_source);
6127 } 6138 }
6128 6139
6129 6140
6130 void v8::V8::SetReturnAddressLocationResolver( 6141 void v8::V8::SetReturnAddressLocationResolver(
6131 ReturnAddressLocationResolver return_address_resolver) { 6142 ReturnAddressLocationResolver return_address_resolver) {
6132 i::StackFrame::SetReturnAddressLocationResolver(return_address_resolver); 6143 i::StackFrame::SetReturnAddressLocationResolver(return_address_resolver);
6133 } 6144 }
(...skipping 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after
10169 Address callback_address = 10180 Address callback_address =
10170 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 10181 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
10171 VMState<EXTERNAL> state(isolate); 10182 VMState<EXTERNAL> state(isolate);
10172 ExternalCallbackScope call_scope(isolate, callback_address); 10183 ExternalCallbackScope call_scope(isolate, callback_address);
10173 callback(info); 10184 callback(info);
10174 } 10185 }
10175 10186
10176 10187
10177 } // namespace internal 10188 } // namespace internal
10178 } // namespace v8 10189 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698