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 8689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8700 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 8700 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
8701 isolate->set_oom_behavior(that); | 8701 isolate->set_oom_behavior(that); |
8702 } | 8702 } |
8703 | 8703 |
8704 void Isolate::SetAllowCodeGenerationFromStringsCallback( | 8704 void Isolate::SetAllowCodeGenerationFromStringsCallback( |
8705 AllowCodeGenerationFromStringsCallback callback) { | 8705 AllowCodeGenerationFromStringsCallback callback) { |
8706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 8706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
8707 isolate->set_allow_code_gen_callback(callback); | 8707 isolate->set_allow_code_gen_callback(callback); |
8708 } | 8708 } |
8709 | 8709 |
8710 void Isolate::SetAllowWasmCompileCallback(AllowWasmCompileCallback callback) { | |
8711 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
8712 isolate->set_allow_wasm_compile_callback(callback); | |
8713 } | |
8714 | |
8715 void Isolate::SetAllowWasmInstantiateCallback( | |
8716 AllowWasmInstantiateCallback callback) { | |
8717 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
8718 isolate->set_allow_wasm_instantiate_callback(callback); | |
8719 } | |
8720 | 8710 |
8721 bool Isolate::IsDead() { | 8711 bool Isolate::IsDead() { |
8722 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 8712 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
8723 return isolate->IsDead(); | 8713 return isolate->IsDead(); |
8724 } | 8714 } |
8725 | 8715 |
8726 bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) { | 8716 bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) { |
8727 return AddMessageListenerWithErrorLevel(that, kMessageError, data); | 8717 return AddMessageListenerWithErrorLevel(that, kMessageError, data); |
8728 } | 8718 } |
8729 | 8719 |
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10284 Address callback_address = | 10274 Address callback_address = |
10285 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10275 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10286 VMState<EXTERNAL> state(isolate); | 10276 VMState<EXTERNAL> state(isolate); |
10287 ExternalCallbackScope call_scope(isolate, callback_address); | 10277 ExternalCallbackScope call_scope(isolate, callback_address); |
10288 callback(info); | 10278 callback(info); |
10289 } | 10279 } |
10290 | 10280 |
10291 | 10281 |
10292 } // namespace internal | 10282 } // namespace internal |
10293 } // namespace v8 | 10283 } // namespace v8 |
OLD | NEW |