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