| OLD | NEW |
| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "src/property.h" | 62 #include "src/property.h" |
| 63 #include "src/prototype.h" | 63 #include "src/prototype.h" |
| 64 #include "src/runtime-profiler.h" | 64 #include "src/runtime-profiler.h" |
| 65 #include "src/runtime/runtime.h" | 65 #include "src/runtime/runtime.h" |
| 66 #include "src/simulator.h" | 66 #include "src/simulator.h" |
| 67 #include "src/snapshot/code-serializer.h" | 67 #include "src/snapshot/code-serializer.h" |
| 68 #include "src/snapshot/natives.h" | 68 #include "src/snapshot/natives.h" |
| 69 #include "src/snapshot/snapshot.h" | 69 #include "src/snapshot/snapshot.h" |
| 70 #include "src/startup-data-util.h" | 70 #include "src/startup-data-util.h" |
| 71 #include "src/tracing/trace-event.h" | 71 #include "src/tracing/trace-event.h" |
| 72 #include "src/trap-handler/trap-handler.h" |
| 72 #include "src/unicode-inl.h" | 73 #include "src/unicode-inl.h" |
| 73 #include "src/v8.h" | 74 #include "src/v8.h" |
| 74 #include "src/v8threads.h" | 75 #include "src/v8threads.h" |
| 75 #include "src/value-serializer.h" | 76 #include "src/value-serializer.h" |
| 76 #include "src/version.h" | 77 #include "src/version.h" |
| 77 #include "src/vm-state-inl.h" | 78 #include "src/vm-state-inl.h" |
| 78 #include "src/wasm/wasm-module.h" | 79 #include "src/wasm/wasm-module.h" |
| 79 #include "src/wasm/wasm-objects.h" | 80 #include "src/wasm/wasm-objects.h" |
| 80 #include "src/wasm/wasm-result.h" | 81 #include "src/wasm/wasm-result.h" |
| 81 | 82 |
| (...skipping 6063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6145 | 6146 |
| 6146 | 6147 |
| 6147 bool v8::V8::Initialize() { | 6148 bool v8::V8::Initialize() { |
| 6148 i::V8::Initialize(); | 6149 i::V8::Initialize(); |
| 6149 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 6150 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 6150 i::ReadNatives(); | 6151 i::ReadNatives(); |
| 6151 #endif | 6152 #endif |
| 6152 return true; | 6153 return true; |
| 6153 } | 6154 } |
| 6154 | 6155 |
| 6156 #if V8_OS_LINUX && V8_TARGET_ARCH_X64 |
| 6157 bool V8::TryHandleSignal(int signum, void* info, void* context) { |
| 6158 return v8::internal::trap_handler::TryHandleSignal( |
| 6159 signum, static_cast<siginfo_t*>(info), static_cast<ucontext_t*>(context)); |
| 6160 } |
| 6161 #endif // V8_OS_LINUX |
| 6162 |
| 6163 bool V8::RegisterDefaultSignalHandler() { |
| 6164 return v8::internal::trap_handler::RegisterDefaultSignalHandler(); |
| 6165 } |
| 6155 | 6166 |
| 6156 void v8::V8::SetEntropySource(EntropySource entropy_source) { | 6167 void v8::V8::SetEntropySource(EntropySource entropy_source) { |
| 6157 base::RandomNumberGenerator::SetEntropySource(entropy_source); | 6168 base::RandomNumberGenerator::SetEntropySource(entropy_source); |
| 6158 } | 6169 } |
| 6159 | 6170 |
| 6160 | 6171 |
| 6161 void v8::V8::SetReturnAddressLocationResolver( | 6172 void v8::V8::SetReturnAddressLocationResolver( |
| 6162 ReturnAddressLocationResolver return_address_resolver) { | 6173 ReturnAddressLocationResolver return_address_resolver) { |
| 6163 i::StackFrame::SetReturnAddressLocationResolver(return_address_resolver); | 6174 i::StackFrame::SetReturnAddressLocationResolver(return_address_resolver); |
| 6164 } | 6175 } |
| (...skipping 4095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10260 Address callback_address = | 10271 Address callback_address = |
| 10261 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10272 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10262 VMState<EXTERNAL> state(isolate); | 10273 VMState<EXTERNAL> state(isolate); |
| 10263 ExternalCallbackScope call_scope(isolate, callback_address); | 10274 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10264 callback(info); | 10275 callback(info); |
| 10265 } | 10276 } |
| 10266 | 10277 |
| 10267 | 10278 |
| 10268 } // namespace internal | 10279 } // namespace internal |
| 10269 } // namespace v8 | 10280 } // namespace v8 |
| OLD | NEW |