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