| 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" | |
| 73 #include "src/unicode-inl.h" | 72 #include "src/unicode-inl.h" |
| 74 #include "src/v8.h" | 73 #include "src/v8.h" |
| 75 #include "src/v8threads.h" | 74 #include "src/v8threads.h" |
| 76 #include "src/value-serializer.h" | 75 #include "src/value-serializer.h" |
| 77 #include "src/version.h" | 76 #include "src/version.h" |
| 78 #include "src/vm-state-inl.h" | 77 #include "src/vm-state-inl.h" |
| 79 #include "src/wasm/wasm-module.h" | 78 #include "src/wasm/wasm-module.h" |
| 80 #include "src/wasm/wasm-objects.h" | 79 #include "src/wasm/wasm-objects.h" |
| 81 #include "src/wasm/wasm-result.h" | 80 #include "src/wasm/wasm-result.h" |
| 82 | 81 |
| (...skipping 6062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6145 | 6144 |
| 6146 | 6145 |
| 6147 bool v8::V8::Initialize() { | 6146 bool v8::V8::Initialize() { |
| 6148 i::V8::Initialize(); | 6147 i::V8::Initialize(); |
| 6149 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 6148 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
| 6150 i::ReadNatives(); | 6149 i::ReadNatives(); |
| 6151 #endif | 6150 #endif |
| 6152 return true; | 6151 return true; |
| 6153 } | 6152 } |
| 6154 | 6153 |
| 6155 #if V8_OS_LINUX && V8_TARGET_ARCH_X64 | |
| 6156 bool V8::TryHandleSignal(int signum, void* info, void* context) { | |
| 6157 return v8::internal::trap_handler::TryHandleSignal( | |
| 6158 signum, static_cast<siginfo_t*>(info), static_cast<ucontext_t*>(context)); | |
| 6159 } | |
| 6160 #endif // V8_OS_LINUX | |
| 6161 | |
| 6162 bool V8::RegisterDefaultSignalHandler() { | |
| 6163 return v8::internal::trap_handler::RegisterDefaultSignalHandler(); | |
| 6164 } | |
| 6165 | 6154 |
| 6166 void v8::V8::SetEntropySource(EntropySource entropy_source) { | 6155 void v8::V8::SetEntropySource(EntropySource entropy_source) { |
| 6167 base::RandomNumberGenerator::SetEntropySource(entropy_source); | 6156 base::RandomNumberGenerator::SetEntropySource(entropy_source); |
| 6168 } | 6157 } |
| 6169 | 6158 |
| 6170 | 6159 |
| 6171 void v8::V8::SetReturnAddressLocationResolver( | 6160 void v8::V8::SetReturnAddressLocationResolver( |
| 6172 ReturnAddressLocationResolver return_address_resolver) { | 6161 ReturnAddressLocationResolver return_address_resolver) { |
| 6173 i::StackFrame::SetReturnAddressLocationResolver(return_address_resolver); | 6162 i::StackFrame::SetReturnAddressLocationResolver(return_address_resolver); |
| 6174 } | 6163 } |
| (...skipping 4115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10290 Address callback_address = | 10279 Address callback_address = |
| 10291 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10280 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10292 VMState<EXTERNAL> state(isolate); | 10281 VMState<EXTERNAL> state(isolate); |
| 10293 ExternalCallbackScope call_scope(isolate, callback_address); | 10282 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10294 callback(info); | 10283 callback(info); |
| 10295 } | 10284 } |
| 10296 | 10285 |
| 10297 | 10286 |
| 10298 } // namespace internal | 10287 } // namespace internal |
| 10299 } // namespace v8 | 10288 } // namespace v8 |
| OLD | NEW |