22 #include <type_traits> 52 class ImplementationUtilities;
63 class ObjectOperationDescriptor;
70 class RawOperationDescriptor;
91 template<
class T>
class NonCopyablePersistentTraits;
93 template <
class T,
class M = NonCopyablePersistentTraits<T> >
100 template <
class K,
class V,
class T>
102 template <
class K,
class V,
class T>
105 template<
class T,
class P>
class WeakCallbackObject;
113 class CallHandlerHelper;
119 class DeferredHandles;
122 class ExternalString;
124 class LocalEmbedderHeapTracer;
125 class MicrotaskQueue;
126 struct ScriptStreamingData;
128 class PropertyCallbackArguments;
129 class FunctionCallbackArguments;
131 class ScopedExternalStringLock;
132 class ThreadLocalTop;
136 class StreamingDecoder;
142 class ConsoleCallArguments;
147 #define TYPE_CHECK(T, S) 149 *(static_cast<T* volatile*>(0
)) = static_cast<S*>(0
); 189 : val_(
reinterpret_cast<T*>(*that)) {
222 if (a ==
nullptr)
return b ==
nullptr;
223 if (b ==
nullptr)
return false;
231 if (a ==
nullptr)
return b ==
nullptr;
232 if (b ==
nullptr)
return false;
244 return !operator==(that);
249 return !operator==(that);
258 #ifdef V8_ENABLE_CHECKS 261 if (that.IsEmpty())
return Local<T>();
263 return Local<T>(T::Cast(*that));
273 return Local<S>::Cast(*
this);
291 template<
class F>
friend class Local;
308 template <
class F1,
class F2,
class F3>
316 explicit V8_INLINE Local(T* that) : val_(that) {}
322 #if !defined(V8_IMMINENT_DEPRECATION_WARNINGS) 345 : val_(
reinterpret_cast<T*>(*that)) {
357 out->val_ =
IsEmpty() ?
nullptr :
this->val_;
384 template <
class T>
class Eternal {
389 Set(isolate, handle);
401 static const int kInternalFieldsInWeakCallback = 2;
402 static const int kEmbedderFieldsInWeakCallback = 2;
404 template <
typename T>
410 void* embedder_fields[kEmbedderFieldsInWeakCallback],
412 : isolate_(isolate), parameter_(parameter), callback_(callback) {
413 for (
int i = 0; i < kEmbedderFieldsInWeakCallback; ++i) {
414 embedder_fields_[i] = embedder_fields[i];
434 void* embedder_fields_[kEmbedderFieldsInWeakCallback];
483 return Local<T>::New(isolate, *
this);
490 if (a ==
nullptr)
return b ==
nullptr;
491 if (b ==
nullptr)
return false;
499 if (a ==
nullptr)
return b ==
nullptr;
500 if (b ==
nullptr)
return false;
506 return !operator==(that);
511 return !operator==(that);
521 template <
typename P>
569 template<
class F>
friend class Local;
575 template <
class F1,
class F2,
class F3>
580 explicit V8_INLINE PersistentBase(T* val) : val_(val) {}
594 class NonCopyablePersistentTraits {
598 template<
class S,
class M>
618 template<
class S,
class M>
655 template <
class S,
class M2>
669 template <
class S,
class M2>
677 template <
class S,
class M2>
688 if (M::kResetInDestructor)
this->Reset();
694 #ifdef V8_ENABLE_CHECKS 697 if (!that.IsEmpty()) T::Cast(*that);
711 template<
class F>
friend class Local;
716 V8_INLINE T* operator*()
const {
return this->val_; }
717 template<
class S,
class M2>
786 V8_INLINE T* operator*()
const {
return this->val_; }
797 template <
typename T>
825 template <
typename T>
841 : val_(New(isolate, *that, &val_)) {
850 *
this = std::move(other);
856 template <
typename S>
859 *
this = std::move(other);
873 template <
typename S>
911 bool IsEmpty()
const {
return val_ ==
nullptr; }
941 if (a ==
nullptr)
return b ==
nullptr;
942 if (b ==
nullptr)
return false;
950 if (a ==
nullptr)
return b ==
nullptr;
951 if (b ==
nullptr)
return false;
957 return !operator==(that);
962 return !operator==(that);
991 struct WrappedForDestruction {
994 explicit WrappedForDestruction(T* val) : value(val) {}
995 ~WrappedForDestruction();
996 operator T*()
const {
return value; }
997 T* operator*()
const {
return value; }
998 T* operator->()
const {
return value; }
999 WrappedForDestruction& operator=(
const WrappedForDestruction& other) {
1000 value = other.value;
1003 WrappedForDestruction& operator=(T* val) {
1011 T* operator*()
const {
return this->val_; }
1013 typename std::conditional<
1015 WrappedForDestruction, T*>::type val_{
nullptr};
1018 template <
typename F>
1021 template <
typename F>
1051 return reinterpret_cast<
Isolate*>(isolate_);
1068 void* operator
new(size_t size);
1069 void* operator
new[](size_t size);
1070 void operator
delete(
void*, size_t);
1071 void operator
delete[](
void*, size_t);
1104 return Local<T>(
reinterpret_cast<T*>(slot));
1109 return Escape(value.FromMaybe(
Local<T>()));
1118 void* operator
new(size_t size);
1119 void* operator
new[](size_t size);
1120 void operator
delete(
void*, size_t);
1121 void operator
delete[](
void*, size_t);
1143 void* operator
new(size_t size);
1144 void* operator
new[](size_t size);
1145 void operator
delete(
void*, size_t);
1146 void operator
delete[](
void*, size_t);
1150 int prev_sealed_level_;
1208 bool is_opaque =
false,
bool is_wasm =
false,
1209 bool is_module =
false)
1210 : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
1211 (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0) |
1212 (is_module ? kIsModule : 0)) {}
1215 (kIsSharedCrossOrigin | kIsOpaque | kIsWasm | kIsModule)) {}
1218 return (flags_ & kIsSharedCrossOrigin) != 0;
1220 bool IsOpaque()
const {
return (flags_ & kIsOpaque) != 0; }
1221 bool IsWasm()
const {
return (flags_ & kIsWasm) != 0; }
1222 bool IsModule()
const {
return (flags_ & kIsModule) != 0; }
1228 kIsSharedCrossOrigin = 1,
1318 : line_number_(line_number), column_number_(column_number) {}
1590 virtual size_t
GetMoreData(
const uint8_t** src) = 0;
1621 "This class takes ownership of source_stream, so use the constructor " 1622 "taking a unique_ptr to make these semantics clearer",
1635 std::unique_ptr<
internal::ScriptStreamingData> impl_;
1649 explicit ScriptStreamingTask(
internal::ScriptStreamingData* data)
1652 internal::ScriptStreamingData* data_;
1786 Local<
String> arguments[], size_t context_extension_count,
2155 size_t* actual_size);
2221 PrivateData* private_;
2246 Isolate* isolate, uint32_t transfer_id);
2253 Isolate* isolate, uint32_t clone_id);
2323 PrivateData* private_;
2661 V8_INLINE bool QuickIsUndefined()
const;
2663 V8_INLINE bool QuickIsNullOrUndefined()
const;
2665 bool FullIsUndefined()
const;
2666 bool FullIsNull()
const;
2667 bool FullIsString()
const;
2688 static void CheckCast(
v8::
Value* obj);
2709 static void CheckCast(
Value* obj);
2809 int Write(
Isolate* isolate, uint16_t* buffer,
int start = 0,
int length = -1,
2813 int length = -1,
int options =
NO_OPTIONS)
const;
2816 int* nchars_ref =
nullptr,
int options =
NO_OPTIONS)
const;
2901 virtual const uint16_t*
data()
const = 0;
2906 virtual size_t
length()
const = 0;
2931 virtual const char*
data()
const = 0;
2933 virtual size_t
length()
const = 0;
2963 Isolate* isolate,
const char* data,
2969 Isolate* isolate,
const uint8_t* data,
2975 Isolate* isolate,
const uint16_t* data,
3094 static void CheckCast(
v8::
Value* obj);
3146 static void CheckCast(
Value* obj);
3184 static void CheckCast(
Data* that);
3193 double Value()
const;
3198 static void CheckCast(
v8::
Value* obj);
3209 int64_t
Value()
const;
3213 static void CheckCast(
v8::
Value* obj);
3222 int32_t
Value()
const;
3227 static void CheckCast(
v8::
Value* obj);
3236 uint32_t
Value()
const;
3241 static void CheckCast(
v8::
Value* obj);
3259 int word_count,
const uint64_t* words);
3267 uint64_t
Uint64Value(
bool* lossless =
nullptr)
const;
3274 int64_t
Int64Value(
bool* lossless =
nullptr)
const;
3290 void ToWordsArray(
int* sign_bit,
int* word_count, uint64_t* words)
const;
3296 static void CheckCast(
v8::
Value* obj);
3848 static void CheckCast(
Value* obj);
3849 Local<
Value> SlowGetInternalField(
int index);
3850 void* SlowGetAlignedPointerFromInternalField(
int index);
3876 static void CheckCast(
Value* obj);
3885 size_t
Size()
const;
3912 static void CheckCast(
Value* obj);
3921 size_t
Size()
const;
3944 static void CheckCast(
Value* obj);
3948 template<
typename T>
3952 : value_(that.value_) {
3956 template <
typename S>
3958 template <
typename S>
3960 template <
typename S>
3975 template <
typename S>
3987 template <
class F,
class G,
class H>
4002 template<
typename T>
4038 friend class debug::ConsoleCallArguments;
4058 template<
typename T>
4150 friend class MacroAssembler;
4257 static void CheckCast(
Value* obj);
4260 #ifndef V8_PROMISE_INTERNAL_FIELD_COUNT 4262 #define V8_PROMISE_INTERNAL_FIELD_COUNT 0
4303 static void CheckCast(
Value* obj);
4350 static void CheckCast(
Value* obj);
4423 PrivateData* private_;
4448 static void CheckCast(
Value* obj);
4461 template <
typename T>
4467 constexpr MemorySpan(T* data, size_t size) : data_(data), size_(size) {}
4470 constexpr T*
data()
const {
return data_; }
4472 constexpr size_t
size()
const {
return size_; }
4506 explicit CompiledWasmModule(std::shared_ptr<
internal::
wasm::NativeModule>);
4509 const std::shared_ptr<
internal::
wasm::NativeModule> native_module_;
4521 class TransferrableModule
final {
4526 TransferrableModule&
operator=(TransferrableModule&& src) =
default;
4527 TransferrableModule&
operator=(
const TransferrableModule& src) =
delete;
4530 typedef std::shared_ptr<
internal::
wasm::NativeModule> SharedModule;
4532 explicit TransferrableModule(SharedModule shared_module)
4533 : shared_module_(std::move(shared_module)) {}
4535 : serialized_(std::move(serialized)), wire_bytes_(std::move(bytes)) {}
4537 SharedModule shared_module_;
4554 Isolate* isolate,
const TransferrableModule&);
4576 const uint8_t* start,
4583 static void CheckCast(
Value* obj);
4594 class WasmStreamingImpl;
4601 virtual ~
Client() =
default;
4609 explicit WasmStreaming(std::unique_ptr<WasmStreamingImpl> impl);
4653 static std::shared_ptr<WasmStreaming>
Unpack(
Isolate* isolate,
4657 std::unique_ptr<WasmStreamingImpl> impl_;
4681 WasmModuleObjectBuilderStreaming(
const WasmModuleObjectBuilderStreaming&) =
4683 WasmModuleObjectBuilderStreaming(WasmModuleObjectBuilderStreaming&&) =
4685 WasmModuleObjectBuilderStreaming& operator=(
4686 const WasmModuleObjectBuilderStreaming&) =
delete;
4687 WasmModuleObjectBuilderStreaming& operator=(
4688 WasmModuleObjectBuilderStreaming&&) =
default;
4699 Persistent<Promise, CopyablePersistentTraits<Promise>> promise_;
4703 std::shared_ptr<
internal::
wasm::StreamingDecoder> streaming_decoder_;
4706 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 4708 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
4743 virtual void*
Allocate(size_t length) = 0;
4755 virtual void Free(
void* data, size_t length) = 0;
4784 using DeleterCallback =
void (*)(
void* buffer, size_t length,
void* info);
4789 allocation_base_(
nullptr),
4790 allocation_length_(0),
4793 deleter_data_(
nullptr) {}
4798 return allocation_mode_;
4801 void*
Data()
const {
return data_; }
4803 DeleterCallback
Deleter()
const {
return deleter_; }
4807 Contents(
void* data, size_t byte_length,
void* allocation_base,
4808 size_t allocation_length,
4810 void* deleter_data);
4813 size_t byte_length_;
4814 void* allocation_base_;
4815 size_t allocation_length_;
4817 DeleterCallback deleter_;
4818 void* deleter_data_;
4847 Isolate* isolate,
void* data, size_t byte_length,
4863 inline bool IsNeuterable()
const) {
4907 static void CheckCast(
Value* obj);
4911 #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 4913 #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2
4962 static void CheckCast(
Value* obj);
4987 static void CheckCast(
Value* obj);
4997 size_t byte_offset, size_t length);
4999 size_t byte_offset, size_t length);
5004 static void CheckCast(
Value* obj);
5014 size_t byte_offset, size_t length);
5021 Uint8ClampedArray();
5022 static void CheckCast(
Value* obj);
5031 size_t byte_offset, size_t length);
5033 size_t byte_offset, size_t length);
5038 static void CheckCast(
Value* obj);
5048 size_t byte_offset, size_t length);
5050 size_t byte_offset, size_t length);
5055 static void CheckCast(
Value* obj);
5065 size_t byte_offset, size_t length);
5067 size_t byte_offset, size_t length);
5072 static void CheckCast(
Value* obj);
5082 size_t byte_offset, size_t length);
5084 size_t byte_offset, size_t length);
5089 static void CheckCast(
Value* obj);
5099 size_t byte_offset, size_t length);
5101 size_t byte_offset, size_t length);
5106 static void CheckCast(
Value* obj);
5116 size_t byte_offset, size_t length);
5118 size_t byte_offset, size_t length);
5123 static void CheckCast(
Value* obj);
5133 size_t byte_offset, size_t length);
5135 size_t byte_offset, size_t length);
5140 static void CheckCast(
Value* obj);
5149 size_t byte_offset, size_t length);
5151 size_t byte_offset, size_t length);
5156 static void CheckCast(
Value* obj);
5165 size_t byte_offset, size_t length);
5167 size_t byte_offset, size_t length);
5172 static void CheckCast(
Value* obj);
5181 size_t byte_offset, size_t length);
5183 size_t byte_offset, size_t length);
5188 static void CheckCast(
Value* obj);
5212 using DeleterCallback =
void (*)(
void* buffer, size_t length,
void* info);
5217 allocation_base_(
nullptr),
5218 allocation_length_(0),
5221 deleter_data_(
nullptr) {}
5226 return allocation_mode_;
5229 void*
Data()
const {
return data_; }
5231 DeleterCallback
Deleter()
const {
return deleter_; }
5235 Contents(
void* data, size_t byte_length,
void* allocation_base,
5236 size_t allocation_length,
5237 Allocator::
AllocationMode allocation_mode, DeleterCallback deleter,
5238 void* deleter_data);
5241 size_t byte_length_;
5242 void* allocation_base_;
5243 size_t allocation_length_;
5245 DeleterCallback deleter_;
5246 void* deleter_data_;
5271 Isolate* isolate,
void* data, size_t byte_length,
5278 V8_DEPRECATED(
"Use New method with data, and byte_length instead.",
5323 SharedArrayBuffer();
5324 static void CheckCast(
Value* obj);
5345 static void CheckCast(
Value* obj);
5361 static void CheckCast(
Value* obj);
5376 static void CheckCast(
Value* obj);
5391 static void CheckCast(
Value* obj);
5407 static void CheckCast(
Value* obj);
5423 static void CheckCast(
Value* obj);
5476 static void CheckCast(
Value* obj);
5514 void*
Value()
const;
5516 static void CheckCast(
v8::
Value* obj);
5519 #define V8_INTRINSICS_LIST(F) 5520 F(ArrayProto_entries, array_entries_iterator) 5521 F(ArrayProto_forEach, array_for_each_iterator) 5522 F(ArrayProto_keys, array_keys_iterator) 5523 F(ArrayProto_values, array_values_iterator) 5524 F(ErrorPrototype, initial_error_prototype) 5525 F(IteratorPrototype, initial_iterator_prototype) 5528 #define V8_DECL_INTRINSIC(name, iname) k##name, 5530 #undef V8_DECL_INTRINSIC 6080 static void CheckCast(
Data* that);
6363 deleter
, enumerator
, data
));
6449 static void CheckCast(
Data* that);
6472 static void CheckCast(
Data* that);
6489 AccessorSignature();
6491 static void CheckCast(
Data* that);
6504 Extension(
const char* name,
const char* source =
nullptr,
int dep_count = 0,
6505 const char** deps =
nullptr,
int source_length = -1);
6512 const char*
name()
const {
return name_; }
6528 size_t source_length_;
6579 size_t maximum_heap_size_in_bytes);
6591 uint64_t virtual_memory_limit);
6614 return max_old_generation_size_;
6617 max_old_generation_size_ = limit;
6626 return max_young_generation_size_;
6629 max_young_generation_size_ = limit;
6633 return initial_old_generation_size_;
6636 initial_old_generation_size_ = initial_size;
6640 return initial_young_generation_size_;
6643 initial_young_generation_size_ = initial_size;
6650 size_t code_range_size()
const) {
6651 return code_range_size_ / kMB;
6654 void set_code_range_size(size_t limit_in_mb)) {
6655 code_range_size_ = limit_in_mb * kMB;
6658 size_t max_semi_space_size_in_kb()
const);
6660 void set_max_semi_space_size_in_kb(size_t limit_in_kb));
6662 size_t max_old_space_size()
const) {
6663 return max_old_generation_size_ / kMB;
6666 void set_max_old_space_size(size_t limit_in_mb)) {
6667 max_old_generation_size_ = limit_in_mb * kMB;
6670 size_t max_zone_pool_size()
const) {
6671 return max_zone_pool_size_;
6674 void set_max_zone_pool_size(size_t bytes)) {
6675 max_zone_pool_size_ = bytes;
6679 static constexpr size_t kMB = 1048576u;
6680 size_t code_range_size_ = 0;
6681 size_t max_old_generation_size_ = 0;
6682 size_t max_young_generation_size_ = 0;
6683 size_t max_zone_pool_size_ = 0;
6684 size_t initial_old_generation_size_ = 0;
6685 size_t initial_young_generation_size_ = 0;
6686 uint32_t* stack_limit_ =
nullptr;
6698 const char* message);
6854 : promise_(promise), event_(event), value_(value) {}
6870 typedef void (*MicrotasksCompletedCallback)(
Isolate*));
6920 void* data =
nullptr) = 0;
6964 MicrotaskQueue() =
default;
7005 internal::MicrotaskQueue*
const microtask_queue_;
7099 typedef size_t (*NearHeapLimitCallback)(
void* data, size_t current_heap_limit,
7100 size_t initial_heap_limit);
7130 size_t total_heap_size_;
7131 size_t total_heap_size_executable_;
7132 size_t total_physical_size_;
7133 size_t total_available_size_;
7134 size_t used_heap_size_;
7135 size_t heap_size_limit_;
7136 size_t malloced_memory_;
7137 size_t external_memory_;
7138 size_t peak_malloced_memory_;
7139 bool does_zap_garbage_;
7140 size_t number_of_native_contexts_;
7141 size_t number_of_detached_contexts_;
7158 const char* space_name_;
7160 size_t space_used_size_;
7161 size_t space_available_size_;
7162 size_t physical_space_size_;
7177 const char* object_type_;
7178 const char* object_sub_type_;
7179 size_t object_count_;
7180 size_t object_size_;
7193 size_t code_and_metadata_size_;
7194 size_t bytecode_and_metadata_size_;
7195 size_t external_script_source_size_;
7269 void* new_code_start;
7317 #if defined(V8_OS_WIN) 7339 uint16_t class_id) {}
7415 const std::vector<std::pair<
void*,
void*> >& embedder_fields) = 0;
7451 virtual void TraceEpilogue()) {}
7545 void* data_arg =
nullptr)
7562 void* data_arg =
nullptr)
7712 void* internal_throws_;
7713 void* internal_assert_;
7714 void* internal_dump_;
7735 internal::MicrotaskQueue*
const microtask_queue_;
8103 size_t frames_limit,
SampleInfo* sample_info);
8278 size_t offset_in_bytes, int64_t value,
8279 double timeout_in_ms,
8310 void* data =
nullptr);
8313 typedef size_t (*GetExternallyAllocatedMemoryInBytesCallback)();
8322 GetExternallyAllocatedMemoryInBytesCallback callback);
8465 void AddMicrotasksCompletedCallback(
8466 MicrotasksCompletedCallback callback));
8474 void RemoveMicrotasksCompletedCallback(
8475 MicrotasksCompletedCallback callback));
8640 void GetCodeRange(
void** start, size_t* length_in_bytes);
8753 bool capture,
int frame_limit = 10,
8834 void*
operator new(size_t size) =
delete;
8835 void*
operator new[](size_t size) =
delete;
8836 void operator delete(
void*, size_t) =
delete;
8837 void operator delete[](
void*, size_t) =
delete;
8840 template <
class K,
class V,
class Traits>
8844 void ReportExternalAllocationLimitReached();
8845 void CheckMemoryPressure();
8881 typedef uintptr_t (*ReturnAddressLocationResolver)(
8882 uintptr_t return_addr_location);
8918 static void SetFlagsFromString(
const char* str,
int length));
8947 ReturnAddressLocationResolver return_address_resolver);
8967 static bool InitializeICU(
const char* icu_data_file =
nullptr);
8982 const char* icu_data_file =
nullptr);
9002 const char* snapshot_blob);
9036 static bool TryHandleSignal(
int signal_number,
void* info,
9048 #if defined(V8_OS_WIN) 9070 bool has_destructor);
9075 static void CopyTracedGlobalReference(
const internal::
Address*
const* from,
9085 static void SetFinalizationCallbackTraced(
9092 template <
class K,
class V,
class T>
9095 static void FromJustIsNothing();
9096 static void ToLocalEmpty();
9097 static void InternalFieldOutOfBounds(
int index);
9131 const intptr_t* external_references =
nullptr,
9272 return has_value_ ? value_ : default_value;
9276 return (
IsJust() == other.IsJust()) &&
9285 Maybe() : has_value_(
false) {}
9286 explicit Maybe(
const T& t) : has_value_(
true), value_(t) {}
9325 Maybe() : is_valid_(
false) {}
9326 explicit Maybe(JustTag) : is_valid_(
true) {}
9462 if (handler ==
nullptr)
return nullptr;
9463 return handler->js_stack_comparable_address_;
9472 void* operator
new(size_t size);
9473 void* operator
new[](size_t size);
9474 void operator
delete(
void*, size_t);
9475 void operator
delete[](
void*, size_t);
9477 void ResetInternal();
9483 void* js_stack_comparable_address_;
9484 bool is_verbose_ : 1;
9485 bool can_continue_ : 1;
9486 bool capture_message_ : 1;
9488 bool has_terminated_ : 1;
9504 : name_count_(name_count), names_(names) { }
9506 const char**
begin()
const {
return &names_[0]; }
9507 const char**
end()
const {
return &names_[name_count_]; }
9510 const int name_count_;
9511 const char** names_;
9585 Isolate* isolate, size_t context_snapshot_index,
9769 return js_stack_comparable_address_;
9776 uintptr_t js_stack_comparable_address_ = 0;
9777 const BackupIncumbentScope* prev_ =
nullptr;
9788 void* SlowGetAlignedPointerFromEmbedderData(
int index);
9877 void Initialize(
Isolate* isolate);
9908 void Initialize(
Isolate* isolate);
9952 const void* stack_base);
9969 return New(isolate, that.val_);
9974 return New(isolate, that.val_);
9979 return New(isolate, that.val_);
9984 if (that ==
nullptr)
return Local<T>();
9988 reinterpret_cast<
internal::Isolate*>(isolate)
, *p
)));
9996 val_ =
reinterpret_cast<T*>(
9997 V8::Eternalize(isolate,
reinterpret_cast<
Value*>(*handle)));
10004 return Local<T>(val_);
10011 return Local<T>(val_);
10017 #ifdef V8_ENABLE_CHECKS 10018 if (index < 0 || index >= kEmbedderFieldsInWeakCallback) {
10019 V8::InternalFieldOutOfBounds(index);
10022 return embedder_fields_[index];
10028 if (that ==
nullptr)
return nullptr;
10030 return reinterpret_cast<T*>(
10031 V8::GlobalizeReference(
reinterpret_cast<
internal::Isolate*>(isolate),
10036 template <
class T,
class M>
10037 template <
class S,
class M2>
10041 if (that.IsEmpty())
return;
10043 this->val_ =
reinterpret_cast<T*>(
V8::CopyGlobalReference(p));
10044 M::Copy(that,
this);
10050 if (
this->IsEmpty())
return false;
10058 if (
this->IsEmpty())
return;
10069 if (other.IsEmpty())
return;
10070 this->val_ = New(isolate, other.val_);
10080 if (other.IsEmpty())
return;
10081 this->val_ = New(isolate, other.val_);
10086 template <
typename P>
10092 reinterpret_cast<Callback>(callback), type);
10101 template <
typename P>
10103 return reinterpret_cast<P*>(
10116 if (
this->IsEmpty())
return;
10119 *
reinterpret_cast<uint16_t*>(addr) = class_id;
10126 if (
this->IsEmpty())
return 0;
10129 return *
reinterpret_cast<uint16_t*>(addr);
10134 if (other.val_ !=
nullptr) {
10137 other.val_ =
nullptr;
10145 if (
this != &rhs) {
10147 if (rhs.val_ !=
nullptr) {
10148 this->val_ = rhs.val_;
10149 V8::MoveGlobalReference(
10152 rhs.val_ =
nullptr;
10159 TracedGlobal<T>::WrappedForDestruction::~WrappedForDestruction() {
10160 if (value ==
nullptr)
return;
10167 if (that ==
nullptr)
return nullptr;
10169 return reinterpret_cast<T*>(
V8::GlobalizeTracedReference(
10170 reinterpret_cast<
internal::Isolate*>(isolate), p,
10187 if (other.IsEmpty())
return;
10188 this->val_ = New(isolate, other.val_, &val_);
10195 *
this = std::move(rhs.
template As<T>());
10203 *
this = rhs.
template As<T>();
10209 if (
this != &rhs) {
10211 if (rhs.val_ !=
nullptr) {
10212 this->val_ = rhs.val_;
10213 V8::MoveTracedGlobalReference(
10216 rhs.val_ =
nullptr;
10224 if (
this != &rhs) {
10226 if (rhs.val_ !=
nullptr) {
10227 V8::CopyTracedGlobalReference(
10241 *
reinterpret_cast<uint16_t*>(addr) = class_id;
10250 return *
reinterpret_cast<uint16_t*>(addr);
10256 V8::SetFinalizationCallbackTraced(
10260 template <
typename T>
10263 template <
typename T>
10264 template <
typename S>
10268 *value_ = GetDefaultValue();
10274 template <
typename T>
10275 template <
typename S>
10279 *value_ = GetDefaultValue();
10285 template <
typename T>
10286 template <
typename S>
10290 *value_ = GetDefaultValue();
10296 template<
typename T>
10302 template<
typename T>
10313 template<
typename T>
10317 bool fits_into_int32_t = (i & (1U << 31)) == 0;
10319 Set(
static_cast<int32_t>(i));
10325 template<
typename T>
10338 template<
typename T>
10345 template<
typename T>
10352 template<
typename T>
10359 template <
typename T>
10362 return *
reinterpret_cast<
Isolate**>(&value_[-2]);
10365 template <
typename T>
10373 template <
typename T>
10374 template <
typename S>
10380 template <
typename T>
10386 template <
typename T>
10392 template<
typename T>
10399 template<
typename T>
10405 template<
typename T>
10411 template <
typename T>
10417 template <
typename T>
10423 template<
typename T>
10429 template<
typename T>
10435 template<
typename T>
10441 template<
typename T>
10455 : resource_name_(resource_name),
10456 resource_line_offset_(resource_line_offset),
10457 resource_column_offset_(resource_column_offset),
10458 options_
(!resource_is_shared_cross_origin
.IsEmpty() &&
10463 script_id_(script_id),
10464 source_map_url_(source_map_url),
10465 host_defined_options_(host_defined_options) {}
10470 return host_defined_options_;
10474 return resource_line_offset_;
10479 return resource_column_offset_;
10490 : source_string(string),
10497 cached_data(data) {}
10501 : source_string(string), cached_data(data) {}
10505 delete cached_data;
10511 return cached_data;
10515 return resource_options;
10529 #ifdef V8_ENABLE_CHECKS 10536 #ifdef V8_ENABLE_CHECKS 10543 #ifdef V8_ENABLE_CHECKS 10546 return reinterpret_cast<
Signature*>(data);
10550 #ifdef V8_ENABLE_CHECKS 10557 #ifndef V8_ENABLE_CHECKS 10560 A obj = *
reinterpret_cast<A*>(
this);
10569 #ifdef V8_COMPRESS_POINTERS 10572 value = I::DecompressTaggedAnyField(obj,
static_cast<int32_t>(value));
10580 return SlowGetInternalField(index);
10585 #ifndef V8_ENABLE_CHECKS 10588 A obj = *
reinterpret_cast<A*>(
this);
10599 return SlowGetAlignedPointerFromInternalField(index);
10603 #ifdef V8_ENABLE_CHECKS 10606 return static_cast<
String*>(value);
10622 A obj = *
reinterpret_cast<
const A*>(
this);
10629 result = GetExternalStringResourceSlow();
10631 #ifdef V8_ENABLE_CHECKS 10632 VerifyExternalStringResource(result);
10642 A obj = *
reinterpret_cast<
const A*>(
this);
10651 resource = GetExternalStringResourceBaseSlow(encoding_out);
10653 #ifdef V8_ENABLE_CHECKS 10654 VerifyExternalStringResourceBase(resource, *encoding_out);
10661 #ifdef V8_ENABLE_CHECKS 10662 return FullIsUndefined();
10664 return QuickIsUndefined();
10668 bool Value::QuickIsUndefined()
const {
10671 A obj = *
reinterpret_cast<
const A*>(
this);
10679 #ifdef V8_ENABLE_CHECKS 10680 return FullIsNull();
10682 return QuickIsNull();
10686 bool Value::QuickIsNull()
const {
10689 A obj = *
reinterpret_cast<
const A*>(
this);
10696 #ifdef V8_ENABLE_CHECKS 10697 return FullIsNull() || FullIsUndefined();
10699 return QuickIsNullOrUndefined();
10703 bool Value::QuickIsNullOrUndefined()
const {
10706 A obj = *
reinterpret_cast<
const A*>(
this);
10714 #ifdef V8_ENABLE_CHECKS 10715 return FullIsString();
10717 return QuickIsString();
10721 bool Value::QuickIsString()
const {
10724 A obj = *
reinterpret_cast<
const A*>(
this);
10731 return static_cast<
Value*>(value);
10736 #ifdef V8_ENABLE_CHECKS 10739 return static_cast<
Boolean*>(value);
10744 #ifdef V8_ENABLE_CHECKS 10747 return static_cast<
Name*>(value);
10752 #ifdef V8_ENABLE_CHECKS 10755 return static_cast<
Symbol*>(value);
10760 #ifdef V8_ENABLE_CHECKS 10763 return reinterpret_cast<
Private*>(data);
10768 #ifdef V8_ENABLE_CHECKS 10771 return static_cast<
Number*>(value);
10776 #ifdef V8_ENABLE_CHECKS 10779 return static_cast<
Integer*>(value);
10784 #ifdef V8_ENABLE_CHECKS 10787 return static_cast<
Int32*>(value);
10792 #ifdef V8_ENABLE_CHECKS 10795 return static_cast<
Uint32*>(value);
10799 #ifdef V8_ENABLE_CHECKS 10802 return static_cast<
BigInt*>(value);
10806 #ifdef V8_ENABLE_CHECKS 10809 return static_cast<
Date*>(value);
10814 #ifdef V8_ENABLE_CHECKS 10822 #ifdef V8_ENABLE_CHECKS 10830 #ifdef V8_ENABLE_CHECKS 10837 #ifdef V8_ENABLE_CHECKS 10844 #ifdef V8_ENABLE_CHECKS 10852 #ifdef V8_ENABLE_CHECKS 10855 return static_cast<
RegExp*>(value);
10860 #ifdef V8_ENABLE_CHECKS 10863 return static_cast<
Object*>(value);
10868 #ifdef V8_ENABLE_CHECKS 10871 return static_cast<
Array*>(value);
10876 #ifdef V8_ENABLE_CHECKS 10879 return static_cast<
Map*>(value);
10884 #ifdef V8_ENABLE_CHECKS 10887 return static_cast<
Set*>(value);
10892 #ifdef V8_ENABLE_CHECKS 10895 return static_cast<
Promise*>(value);
10900 #ifdef V8_ENABLE_CHECKS 10903 return static_cast<
Proxy*>(value);
10907 #ifdef V8_ENABLE_CHECKS 10914 #ifdef V8_ENABLE_CHECKS 10922 #ifdef V8_ENABLE_CHECKS 10930 #ifdef V8_ENABLE_CHECKS 10938 #ifdef V8_ENABLE_CHECKS 10946 #ifdef V8_ENABLE_CHECKS 10954 #ifdef V8_ENABLE_CHECKS 10962 #ifdef V8_ENABLE_CHECKS 10970 #ifdef V8_ENABLE_CHECKS 10978 #ifdef V8_ENABLE_CHECKS 10986 #ifdef V8_ENABLE_CHECKS 10994 #ifdef V8_ENABLE_CHECKS 11002 #ifdef V8_ENABLE_CHECKS 11009 #ifdef V8_ENABLE_CHECKS 11016 #ifdef V8_ENABLE_CHECKS 11023 #ifdef V8_ENABLE_CHECKS 11031 #ifdef V8_ENABLE_CHECKS 11034 return static_cast<
DataView*>(value);
11039 #ifdef V8_ENABLE_CHECKS 11047 #ifdef V8_ENABLE_CHECKS 11050 return static_cast<
Function*>(value);
11055 #ifdef V8_ENABLE_CHECKS 11058 return static_cast<
External*>(value);
11062 template<
typename T>
11068 template<
typename T>
11074 template<
typename T>
11080 template<
typename T>
11086 template<
typename T>
11091 template <
typename T>
11157 T* data =
reinterpret_cast<T*>(GetDataFromSnapshotOnce(index));
11158 if (data)
internal::PerformCastCheck(data);
11159 return Local<T>(data);
11163 int64_t change_in_bytes) {
11165 constexpr int64_t kMemoryReducerActivationLimit = 32 * 1024 * 1024;
11166 int64_t* external_memory =
reinterpret_cast<int64_t*>(
11168 int64_t* external_memory_limit =
reinterpret_cast<int64_t*>(
11170 int64_t* external_memory_at_last_mc =
11171 reinterpret_cast<int64_t*>(
reinterpret_cast<uint8_t*>(
this) +
11176 const int64_t amount =
11177 static_cast<int64_t>(
static_cast<uint64_t>(change_in_bytes) +
11178 static_cast<uint64_t>(*external_memory));
11179 *external_memory = amount;
11181 int64_t allocation_diff_since_last_mc =
11182 static_cast<int64_t>(
static_cast<uint64_t>(*external_memory) -
11183 static_cast<uint64_t>(*external_memory_at_last_mc));
11186 if (allocation_diff_since_last_mc > kMemoryReducerActivationLimit) {
11187 CheckMemoryPressure();
11190 if (change_in_bytes < 0) {
11191 const int64_t lower_limit =
11192 static_cast<int64_t>(
static_cast<uint64_t>(*external_memory_limit) +
11193 static_cast<uint64_t>(change_in_bytes));
11195 *external_memory_limit = lower_limit;
11197 }
else if (change_in_bytes > 0 && amount > *external_memory_limit) {
11198 ReportExternalAllocationLimitReached();
11200 return *external_memory;
11204 #ifndef V8_ENABLE_CHECKS 11207 A ctx = *
reinterpret_cast<
const A*>(
this);
11213 #ifdef V8_COMPRESS_POINTERS 11217 I::DecompressTaggedAnyField(embedder_data,
static_cast<int32_t>(value));
11220 *
reinterpret_cast<A*>(
this)
);
11224 return SlowGetEmbedderData(index);
11230 #ifndef V8_ENABLE_CHECKS 11233 A ctx = *
reinterpret_cast<
const A*>(
this);
11240 return SlowGetAlignedPointerFromEmbedderData(index);
11246 T* data =
reinterpret_cast<T*>(GetDataFromSnapshotOnce(index));
11247 if (data)
internal::PerformCastCheck(data);
11248 return Local<T>(data);
11253 T* object_ptr = *object;
11255 return AddData(context, *p);
11260 T* object_ptr = *object;
11262 return AddData(*p);
GenericNamedPropertyDefinerCallback definer
bool CanBeRehashed() const
bool IsConstructor() const
Scope(const Scope &)=delete
Local< StackTrace > GetStackTrace() const
static const int kJSApiObjectType
static V8_INLINE StringObject * Cast(Value *obj)
TracedGlobal(Isolate *isolate, Local< S > that)
void RequestInterrupt(InterruptCallback callback, void *data)
Location(int line_number, int column_number)
ExternalStringResource()=default
void(* GCCallback)(GCType type, GCCallbackFlags flags)
void SetLength(int length)
static Local< BigInt64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
V8_INLINE Local< Boolean > True(Isolate *isolate)
V8_WARN_UNUSED_RESULT MaybeLocal< Uint32 > ToArrayIndex(Local< Context > context) const
void SetWasmStreamingCallback(WasmStreamingCallback callback)
size_t space_available_size()
V8_INLINE Local< Value > GetEmbedderData(int index)
V8_INLINE void Set(Isolate *isolate, const char *name, Local< Data > value)
Local< Value > GetSourceMappingURL()
Local< T > Get(Isolate *isolate) const
V8_INLINE Local< Value > GetValue() const
V8_WARN_UNUSED_RESULT MaybeLocal< Array > GetOwnPropertyNames(Local< Context > context)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > ReadValue(Local< Context > context)
friend Maybe< U > Just(const U &u)
static V8_INLINE BigInt64Array * Cast(Value *obj)
void LocaleConfigurationChangeNotification()
static V8_INLINE Object * Cast(Value *obj)
void(* FatalErrorCallback)(const char *location, const char *message)
OwnedBuffer(std::unique_ptr< const uint8_t[]> buffer, size_t size)
void(* BeforeCallEnteredCallback)(Isolate *)
static V8_INLINE Uint8ClampedArray * Cast(Value *obj)
void V8_EXPORT RegisterExtension(std::unique_ptr< Extension >)
Persistent< T, CopyablePersistentTraits< T > > CopyablePersistent
V8_INLINE void SetWrapperClassId(uint16_t class_id)
V8_INLINE uint16_t WrapperClassId() const
static V8_INLINE void Uncompilable()
virtual bool IsRootForNonTracingGC(const v8::TracedGlobal< v8::Value > &handle)
void WriteUint32(uint32_t value)
size_t number_of_native_contexts()
SerializeInternalFieldsCallback SerializeEmbedderFieldsCallback
int64_t Int64Value(bool *lossless=nullptr) const
SafeForTerminationScope(const SafeForTerminationScope &)=delete
void AddCallCompletedCallback(CallCompletedCallback callback)
Local< Value > GetTarget()
virtual ~MicrotaskQueue()=default
void(* WasmStreamingCallback)(const FunctionCallbackInfo< Value > &)
static Local< Symbol > GetReplace(Isolate *isolate)
ScriptOrigin GetScriptOrigin() const
V8_INLINE bool operator==(const Local< S > &that) const
void operator=(const Extension &)=delete
Source(const Source &)=delete
static Local< ObjectTemplate > New(Isolate *isolate, Local< FunctionTemplate > constructor=Local< FunctionTemplate >())
BackupIncumbentScope(Local< Context > backup_incumbent_context)
V8_WARN_UNUSED_RESULT MaybeLocal< String > GetSourceLine(Local< Context > context) const
static V8_INLINE internal::Address ReadTaggedPointerField(internal::Address heap_object_ptr, int offset)
friend class internal::CustomArguments
size_t AddContext(Local< Context > context, SerializeInternalFieldsCallback callback=SerializeInternalFieldsCallback())
virtual MaybeLocal< WasmModuleObject > GetWasmModuleFromId(Isolate *isolate, uint32_t transfer_id)
static Local< FunctionTemplate > New(Isolate *isolate, FunctionCallback callback=nullptr, Local< Value > data=Local< Value >(), Local< Signature > signature=Local< Signature >(), int length=0, ConstructorBehavior behavior=ConstructorBehavior::kAllow, SideEffectType side_effect_type=SideEffectType::kHasSideEffect)
bool IsUint8ClampedArray() const
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Get(Local< Context > context, Local< Value > key)
const char * space_name()
friend Maybe< U > Nothing()
void(* ApiImplementationCallback)(const FunctionCallbackInfo< Value > &)
static void Initialize(Isolate *isolate, const CreateParams ¶ms)
void Reset(Isolate *isolate, const Local< S > &other)
V8_WARN_UNUSED_RESULT MaybeLocal< String > ObjectProtoToString(Local< Context > context)
static V8_INLINE Int8Array * Cast(Value *obj)
DisallowJavascriptExecutionScope(const DisallowJavascriptExecutionScope &)=delete
void SetEventLogger(LogEventCallback that)
const ExternalOneByteStringResource * GetExternalOneByteStringResource() const
static V8_INLINE uint8_t GetNodeState(internal::Address *obj)
Location GetModuleRequestLocation(int i) const
EscapableHandleScope(const EscapableHandleScope &)=delete
void set_enumerable(bool enumerable)
static Local< Float32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static void PrintCurrentStackTrace(Isolate *isolate, FILE *out)
Local< Value > Name() const
void operator delete(void *, size_t)=delete
static Local< Value > New(Isolate *isolate, Local< Symbol > value)
V8_WARN_UNUSED_RESULT Maybe< bool > DefineProperty(Local< Context > context, Local< Name > key, PropertyDescriptor &descriptor)
Local< Value > GetPrototype()
V8_INLINE Persistent & operator=(const Persistent< S, M2 > &that)
static V8_INLINE ArrayBufferView * Cast(Value *obj)
static Local< Set > New(Isolate *isolate)
void(* GCCallback)(Isolate *isolate, GCType type, GCCallbackFlags flags)
void operator=(const PropertyDescriptor &)=delete
size_t code_and_metadata_size()
Local< String > Get() const
Local< String > GetFunctionName() const
int GetLineNumber() const
V8_INLINE Eternal(Isolate *isolate, Local< S > handle)
static MaybeLocal< Proxy > New(Local< Context > context, Local< Object > local_target, Local< Object > local_handler)
static Local< Uint16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
TransferrableModule GetTransferrableModule()
V8_WARN_UNUSED_RESULT Maybe< bool > SetNativeDataProperty(Local< Context > context, Local< Name > name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter=nullptr, Local< Value > data=Local< Value >(), PropertyAttribute attributes=None, SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
bool IsBooleanObject() const
MaybeLocal< Promise >(* HostImportModuleDynamicallyCallback)(Local< Context > context, Local< ScriptOrModule > referrer, Local< String > specifier)
static V8_INLINE SharedArrayBuffer * Cast(Value *obj)
PropertyHandlerFlags flags
V8_WARN_UNUSED_RESULT Maybe< bool > Reject(Local< Context > context, Local< Value > value)
void AddGCPrologueCallback(GCCallbackWithData callback, void *data=nullptr, GCType gc_type_filter=kGCTypeAll)
V8_INLINE void SetUndefined()
void Reset(Isolate *isolate, const PersistentBase< S > &other)
static V8_INLINE Float32Array * Cast(Value *obj)
static V8_INLINE Map * Cast(Value *obj)
Maybe< T > Just(const T &t)
int GetStartPosition() const
V8_INLINE bool IsNothing() const
void SetEmbedderHeapTracer(EmbedderHeapTracer *tracer)
~SuppressMicrotaskExecutionScope()
void SetUseCounterCallback(UseCounterCallback callback)
V8_INLINE T * operator*() const
v8::Isolate * isolate() const
static Local< DataView > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
void RestoreOriginalHeapLimit()
size_t NumberOfPhantomHandleResetsSinceLastCall()
Local< Value > GetSourceURL()
void SetHandler(const NamedPropertyHandlerConfiguration &configuration)
bool IsExternalOneByte() const
V8_WARN_UNUSED_RESULT MaybeLocal< Promise > Then(Local< Context > context, Local< Function > on_fulfilled, Local< Function > on_rejected)
V8_WARN_UNUSED_RESULT Maybe< bool > Equals(Local< Context > context, Local< Value > that) const
Local< ObjectTemplate > PrototypeTemplate()
bool IsBigInt64Array() const
#define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
void ConfigureDefaultsFromHeapSize(size_t initial_heap_size_in_bytes, size_t maximum_heap_size_in_bytes)
V8_INLINE PropertyCallbackInfo(internal::Address *args)
static Local< Symbol > GetMatch(Isolate *isolate)
virtual int GetMicrotasksScopeDepth() const =0
void(* AbortScriptExecutionCallback)(Isolate *isolate, Local< Context > context)
void operator=(const TryCatch &)=delete
static V8_WARN_UNUSED_RESULT MaybeLocal< String > Stringify(Local< Context > context, Local< Value > json_object, Local< String > gap=Local< String >())
void Set(const Local< S > handle)
IndexedPropertyDefinerCallback definer
Utf8Value(const Utf8Value &)=delete
static V8_INLINE Proxy * Cast(Value *obj)
bool IsFloat32Array() const
size_t peak_malloced_memory()
V8_INLINE void * GetAlignedPointerFromInternalField(int index)
static Local< Symbol > GetIsConcatSpreadable(Isolate *isolate)
Local< Value > value() const
bool has_writable() const
bool IsBigIntObject() const
V8_INLINE Local< T > Get(Isolate *isolate) const
static Isolate * Allocate()
ExternalStringResourceBase()=default
V8_INLINE bool IsJust() const
virtual ~PersistentHandleVisitor()=default
V8_INLINE bool operator!=(const Persistent< S > &that) const
static V8_INLINE Uint32Array * Cast(Value *obj)
const char * object_type()
bool IsExecutionTerminating()
void CancelTerminateExecution()
static V8_INLINE AccessorSignature * Cast(Data *data)
virtual void Lock() const
void(* InterruptCallback)(Isolate *isolate, void *data)
CreateHistogramCallback create_histogram_callback
V8_INLINE bool operator!=(const Local< S > &that) const
bool SetCompiledModuleBytes(const uint8_t *bytes, size_t size)
static V8_INLINE int GetOddballKind(const internal::Address obj)
static Local< PrimitiveArray > New(Isolate *isolate, int length)
V8_INLINE T FromJust() const
void SetStackLimit(uintptr_t stack_limit)
static const int kEmbedderDataSlotSize
V8_INLINE T * GetParameter() const
void SetCaptureMessage(bool value)
static Local< Private > ForApi(Isolate *isolate, Local< String > name)
void SetName(Local< String > name)
static constexpr int kExternalAllocationSoftLimit
void SetPromiseRejectCallback(PromiseRejectCallback callback)
size_t does_zap_garbage()
void(* AddHistogramSampleCallback)(void *histogram, int sample)
V8_INLINE Local< Value > SourceMapUrl() const
Local< Value > GetException() const
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Get(Local< Context > context, uint32_t index)
V8_WARN_UNUSED_RESULT MaybeLocal< Uint32 > ToUint32(Local< Context > context) const
bool IsStringObject() const
virtual void * AllocateUninitialized(size_t length)=0
void DisableMemorySavingsMode()
static void SetFlagsFromString(const char *str)
bool StrictEquals(Local< Value > that) const
bool IsArrayBufferView() const
int dependency_count() const
V8_INLINE const CachedData * GetCachedData() const
static const int kArgsLength
Scope & operator=(const Scope &)=delete
V8_INLINE bool operator==(const Local< S > &that) const
static const int kFirstNonstringType
IndexedPropertyDeleterCallback deleter
static const int kNullValueRootIndex
static const uint32_t kNumIsolateDataSlots
SuppressMicrotaskExecutionScope & operator=(const SuppressMicrotaskExecutionScope &)=delete
static V8_INLINE Uint32 * Cast(v8::Value *obj)
V8_WARN_UNUSED_RESULT Maybe< bool > CreateDataProperty(Local< Context > context, uint32_t index, Local< Value > value)
static Local< BigInt64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
virtual Maybe< uint32_t > GetSharedArrayBufferId(Isolate *isolate, Local< SharedArrayBuffer > shared_array_buffer)
V8_INLINE ReturnValue< T > GetReturnValue() const
MaybeLocal< T > GetDataFromSnapshotOnce(size_t index)
static V8_INLINE Array * Cast(Value *obj)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > CallAsFunction(Local< Context > context, Local< Value > recv, int argc, Local< Value > argv[])
void AllowCodeGenerationFromStrings(bool allow)
virtual ~TracedGlobalHandleVisitor()=default
size_t AllocationLength() const
void GetStackSample(const RegisterState &state, void **frames, size_t frames_limit, SampleInfo *sample_info)
void(* IndexedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
static const int kHolderIndex
void RemoveCallCompletedCallback(CallCompletedCallback callback)
V8_INLINE Persistent & operator=(const Persistent &that)
V8_INLINE void * GetAlignedPointerFromEmbedderData(int index)
void RemoveGCPrologueCallback(GCCallback callback)
V8_WARN_UNUSED_RESULT MaybeLocal< Map > Set(Local< Context > context, Local< Value > key, Local< Value > value)
static Local< DataView > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
void(* IndexedPropertyDeleterCallback)(uint32_t index, const PropertyCallbackInfo< Boolean > &info)
void Initialize(Isolate *isolate)
static Local< Symbol > New(Isolate *isolate, Local< String > name=Local< String >())
V8_WARN_UNUSED_RESULT Maybe< int > GetEndColumn(Local< Context > context) const
virtual bool IsTracingDone()=0
void SetCallAsFunctionHandler(FunctionCallback callback, Local< Value > data=Local< Value >())
static void InitializeExternalStartupData(const char *natives_blob, const char *snapshot_blob)
V8_INLINE bool IsString() const
void SetNativeDataProperty(Local< String > name, AccessorGetterCallback getter, AccessorSetterCallback setter=nullptr, Local< Value > data=Local< Value >(), PropertyAttribute attribute=None, Local< AccessorSignature > signature=Local< AccessorSignature >(), AccessControl settings=DEFAULT, SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
static Local< Value > New(Isolate *isolate, double value)
void ToWordsArray(int *sign_bit, int *word_count, uint64_t *words) const
static V8_INLINE void * GetEmbedderData(const v8::Isolate *isolate, uint32_t slot)
V8_INLINE bool IsNothing() const
constexpr MemorySpan()=default
SnapshotCreator(const intptr_t *external_references=nullptr, StartupData *existing_blob=nullptr)
static V8_INLINE Float64Array * Cast(Value *obj)
static const bool kResetInDestructor
const char * name() const
Isolate(const Isolate &)=delete
V8_WARN_UNUSED_RESULT Maybe< PropertyAttribute > GetRealNamedPropertyAttributesInPrototypeChain(Local< Context > context, Local< Name > key)
void * operator new(size_t size)=delete
void LowMemoryNotification()
Local< StackFrame > GetFrame(Isolate *isolate, uint32_t index) const
V8_WARN_UNUSED_RESULT Maybe< bool > InstantiateModule(Local< Context > context, ResolveCallback callback)
static Local< Symbol > GetAsyncIterator(Isolate *isolate)
V8_WARN_UNUSED_RESULT Maybe< bool > WriteValue(Local< Context > context, Local< Value > value)
static V8_INLINE uint32_t GetNumberOfDataSlots()
bool(* ExtensionCallback)(const FunctionCallbackInfo< Value > &)
void EnableMemorySavingsMode()
Local< Value > ThrowException(Local< Value > exception)
~SafeForTerminationScope()
static Local< Array > New(Isolate *isolate, Local< Value > *elements, size_t length)
void SetIntrinsicDataProperty(Local< Name > name, Intrinsic intrinsic, PropertyAttribute attribute=None)
constexpr MemorySpan(T *data, size_t size)
static Local< Signature > New(Isolate *isolate, Local< FunctionTemplate > receiver=Local< FunctionTemplate >())
static V8_WARN_UNUSED_RESULT MaybeLocal< UnboundScript > CompileUnboundScript(Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
V8_INLINE Local< S > As() const
static Local< Uint32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static Local< BigInt > NewFromUnsigned(Isolate *isolate, uint64_t value)
V8_WARN_UNUSED_RESULT Maybe< int > GetLineNumber(Local< Context > context) const
void SetAccessCheckCallback(AccessCheckCallback callback, Local< Value > data=Local< Value >())
bool GetHeapCodeAndMetadataStatistics(HeapCodeStatistics *object_statistics)
static const int kNoColumnInfo
static Local< SharedArrayBuffer > New(Isolate *isolate, void *data, size_t byte_length, ArrayBufferCreationMode mode=ArrayBufferCreationMode::kExternalized)
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, Local< Value > key)
static int NumberOfHandles(Isolate *isolate)
static const int kExternalMemoryLimitOffset
void(* CallCompletedCallback)(Isolate *)
V8_INLINE Local< Value > ResourceName() const
static const int kExternalMemoryAtLastMarkCompactOffset
V8_INLINE TracedGlobal(const TracedGlobal &other)
V8_INLINE Local< T > Escape(Local< T > value)
V8_INLINE bool IsEmpty() const
bool GetHeapSpaceStatistics(HeapSpaceStatistics *space_statistics, size_t index)
Local< ArrayBuffer > Buffer()
CachedData(const uint8_t *data, int length, BufferPolicy buffer_policy=BufferNotOwned)
void(* IndexedPropertyGetterCallback)(uint32_t index, const PropertyCallbackInfo< Value > &info)
void DiscardThreadSpecificMetadata()
static const int kNewTargetIndex
V8_INLINE void Set(int32_t i)
GenericNamedPropertyEnumeratorCallback enumerator
AddHistogramSampleCallback add_histogram_sample_callback
void(* LogEventCallback)(const char *name, int event)
V8_WARN_UNUSED_RESULT Maybe< bool > Delete(Local< Context > context, Local< Value > key)
Local< Value > GetDisplayName() const
virtual void TracePrologue(TraceFlags flags)
Local< Object > FindInstanceInPrototypeChain(Local< FunctionTemplate > tmpl)
static const int kLineOffsetNotFound
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewInstance(Local< Context > context)
static V8_WARN_UNUSED_RESULT MaybeLocal< String > NewExternalTwoByte(Isolate *isolate, ExternalStringResource *resource)
bool SameValue(Local< Value > that) const
V8_INLINE ExternalStringResource * GetExternalStringResource() const
V8_INLINE Persistent(const Persistent< S, M2 > &that)
void UseDefaultSecurityToken()
static V8_INLINE ObjectTemplate * Cast(Data *data)
static V8_INLINE Resolver * Cast(Value *obj)
void RemoveGCEpilogueCallback(GCCallback callback)
DeleterCallback Deleter() const
virtual void * Allocate(size_t length)=0
static Local< Symbol > GetUnscopables(Isolate *isolate)
static Local< Int32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
void set_code_range_size_in_bytes(size_t limit)
V8_INLINE T FromMaybe(const T &default_value) const
static V8_INLINE Boolean * Cast(v8::Value *obj)
static void SetEntropySource(EntropySource source)
DisallowJavascriptExecutionScope(Isolate *isolate, OnFailure on_failure)
Persistent< T, NonCopyablePersistentTraits< T > > NonCopyablePersistent
static Local< Symbol > GetToPrimitive(Isolate *isolate)
static void SetNativesDataBlob(StartupData *startup_blob)
friend class FunctionCallbackInfo
V8_INLINE ScriptOrigin(Local< Value > resource_name, Local< Integer > resource_line_offset=Local< Integer >(), Local< Integer > resource_column_offset=Local< Integer >(), Local< Boolean > resource_is_shared_cross_origin=Local< Boolean >(), Local< Integer > script_id=Local< Integer >(), Local< Value > source_map_url=Local< Value >(), Local< Boolean > resource_is_opaque=Local< Boolean >(), Local< Boolean > is_wasm=Local< Boolean >(), Local< Boolean > is_module=Local< Boolean >(), Local< PrimitiveArray > host_defined_options=Local< PrimitiveArray >())
V8_INLINE bool operator==(const TracedGlobal< S > &that) const
const char * object_sub_type()
static const bool kResetInDestructor
bool IdleNotificationDeadline(double deadline_in_seconds)
BufferPolicy buffer_policy
static Local< Symbol > GetSearch(Isolate *isolate)
static Local< Float32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static V8_INLINE BigUint64Array * Cast(Value *obj)
V8_INLINE bool IsUndefined() const
void operator=(const Locker &)=delete
bool IsGeneratorFunction() const
MaybeLocal< Value >(* PrepareStackTraceCallback)(Local< Context > context, Local< Value > error, Local< Array > sites)
static Local< ArrayBuffer > New(Isolate *isolate, size_t byte_length)
V8_INLINE Local< T > Get(Isolate *isolate) const
Local< String > GetSource() const
friend class WeakCallbackInfo
void MemoryPressureNotification(MemoryPressureLevel level)
static Local< BigUint64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
Local< UnboundModuleScript > GetUnboundModuleScript()
static void ShutdownPlatform()
V8_INLINE Local< Value > GetInternalField(int index)
DeleterCallback Deleter() const
static Local< Value > New(Isolate *isolate, int64_t value)
void AddGCEpilogueCallback(GCCallback callback, GCType gc_type_filter=kGCTypeAll)
void(* GenericNamedPropertyQueryCallback)(Local< Name > property, const PropertyCallbackInfo< Integer > &info)
V8_WARN_UNUSED_RESULT MaybeLocal< String > ToString(Local< Context > context) const
static const int kNoLineNumberInfo
V8_INLINE bool IsNullOrUndefined() const
V8_INLINE Local< Value > Data() const
void(* GenericNamedPropertyEnumeratorCallback)(const PropertyCallbackInfo< Array > &info)
V8_INLINE bool operator==(const PersistentBase< S > &that) const
void(* PromiseRejectCallback)(PromiseRejectMessage message)
internal::ScriptStreamingData * impl() const
void IterateTracedGlobalHandles(TracedGlobalHandleVisitor *visitor)
static Local< String > Concat(Isolate *isolate, Local< String > left, Local< String > right)
void SetNativeDataProperty(Local< Name > name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter=nullptr, Local< Value > data=Local< Value >(), PropertyAttribute attribute=None, Local< AccessorSignature > signature=Local< AccessorSignature >(), AccessControl settings=DEFAULT, SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
GenericNamedPropertyDescriptorCallback descriptor
void SetGetExternallyAllocatedMemoryInBytesCallback(GetExternallyAllocatedMemoryInBytesCallback callback)
void(* GenericNamedPropertyDeleterCallback)(Local< Name > property, const PropertyCallbackInfo< Boolean > &info)
bool(* AbortOnUncaughtExceptionCallback)(Isolate *)
static const int kStringResourceOffset
PropertyDescriptor(Local< Value > value)
V8_INLINE Global(Isolate *isolate, const PersistentBase< S > &that)
void SetEmbedderData(int index, Local< Value > value)
int GetLineNumber(int code_pos)
int GetModuleRequestsLength() const
void(* Callback)(const WeakCallbackInfo< T > &data)
static const int kNoScriptIdInfo
void(* IndexedPropertyDescriptorCallback)(uint32_t index, const PropertyCallbackInfo< Value > &info)
bool AddMessageListener(MessageCallback that, Local< Value > data=Local< Value >())
void * DeleterData() const
V8_INLINE ExternalStringResourceBase * GetExternalStringResourceBase(Encoding *encoding_out) const
V8_INLINE Isolate * GetIsolate() const
static Local< Value > RangeError(Local< String > message)
void SetIndexedPropertyHandler(IndexedPropertyGetterCallback getter, IndexedPropertySetterCallback setter=nullptr, IndexedPropertyQueryCallback query=nullptr, IndexedPropertyDeleterCallback deleter=nullptr, IndexedPropertyEnumeratorCallback enumerator=nullptr, Local< Value > data=Local< Value >())
void SetVerbose(bool value)
static V8_INLINE void Copy(const Persistent< S, M > &source, CopyablePersistent *dest)
void SetInternalField(int index, Local< Value > value)
void SetAccessorProperty(Local< Name > name, Local< Function > getter, Local< Function > setter=Local< Function >(), PropertyAttribute attribute=None, AccessControl settings=DEFAULT)
virtual MaybeLocal< SharedArrayBuffer > GetSharedArrayBufferFromId(Isolate *isolate, uint32_t clone_id)
MaybeLocal< Value > GetPrivate(Local< Context > context, Local< Private > key)
void * AllocationBase() const
PropertyDescriptor(Local< Value > get, Local< Value > set)
TryCatch(const TryCatch &)=delete
static V8_INLINE Local< T > New(Isolate *isolate, const TracedGlobal< T > &that)
V8_INLINE TracedGlobal< S > & As() const
static MaybeLocal< Object > NewRemoteContext(Isolate *isolate, Local< ObjectTemplate > global_template, MaybeLocal< Value > global_object=MaybeLocal< Value >())
V8_WARN_UNUSED_RESULT Maybe< bool > Delete(Local< Context > context, uint32_t index)
void GarbageCollectionForTesting(EmbedderStackState stack_state)
static Local< Message > CreateMessage(Isolate *isolate, Local< Value > exception)
bool MakeExternal(ExternalOneByteStringResource *resource)
static const int kJSObjectHeaderSize
Local< Context > GetIncumbentContext()
static V8_INLINE Function * Cast(Value *obj)
void(* AtomicsWaitCallback)(AtomicsWaitEvent event, Local< SharedArrayBuffer > array_buffer, size_t offset_in_bytes, int64_t value, double timeout_in_ms, AtomicsWaitWakeHandle *stop_handle, void *data)
static Local< Float64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
bool IsInt32Array() const
V8_INLINE Persistent(Isolate *isolate, const Persistent< S, M2 > &that)
V8_WARN_UNUSED_RESULT bool ReadUint32(uint32_t *value)
static void PerformCheckpoint(Isolate *isolate)
V8_WARN_UNUSED_RESULT Maybe< bool > CreateDataProperty(Local< Context > context, Local< Name > key, Local< Value > value)
static const int kInternalFieldCount
bool IsUint8Array() const
static std::shared_ptr< WasmStreaming > Unpack(Isolate *isolate, Local< Value > value)
static Local< Int8Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
V8_INLINE void SetWrapperClassId(uint16_t class_id)
V8_INLINE int Length() const
size_t physical_space_size()
static Local< Uint8ClampedArray > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static const int kArgsLength
bool IsSetIterator() const
static V8_INLINE Date * Cast(Value *obj)
V8_INLINE Local< Object > This() const
static Local< BigInt > New(Isolate *isolate, int64_t value)
static Local< Int8Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
virtual void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual const uint16_t * data() const =0
V8_WARN_UNUSED_RESULT Maybe< bool > Delete(Local< Context > context, Local< Value > key)
Local< String > ValueOf() const
int GetStartColumn() const
MicrotasksScope(Isolate *isolate, MicrotaskQueue *microtask_queue, Type type)
static bool IsLocked(Isolate *isolate)
friend class PersistentValueVector
V8_INLINE P * ClearWeak()
static V8_INLINE Number * Cast(v8::Value *obj)
V8_WARN_UNUSED_RESULT Maybe< uint32_t > Uint32Value(Local< Context > context) const
static V8_INLINE WasmModuleObject * Cast(Value *obj)
CachedData & operator=(const CachedData &)=delete
static V8_WARN_UNUSED_RESULT MaybeLocal< Function > CompileFunctionInContext(Local< Context > context, Source *source, size_t arguments_count, Local< String > arguments[], size_t context_extension_count, Local< Object > context_extensions[], CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason, Local< ScriptOrModule > *script_or_module_out=nullptr)
Extension(const char *name, const char *source=nullptr, int dep_count=0, const char **deps=nullptr, int source_length=-1)
static bool InitializeICUDefaultLocation(const char *exec_path, const char *icu_data_file=nullptr)
size_t AddData(Local< Context > context, Local< T > object)
IndexedPropertySetterCallback setter
static Local< Value > New(Isolate *isolate, Local< String > value)
bool IsArgumentsObject() const
V8_INLINE TracedGlobal(TracedGlobal< S > &&other)
virtual bool IsRunningMicrotasks() const =0
IndexedPropertyGetterCallback getter
static Local< AccessorSignature > New(Isolate *isolate, Local< FunctionTemplate > receiver=Local< FunctionTemplate >())
void(* MessageCallback)(Local< Message > message, Local< Value > data)
void VisitHandlesWithClassIds(PersistentHandleVisitor *visitor)
V8_WARN_UNUSED_RESULT Maybe< bool > SetPrototype(Local< Context > context, Local< Value > prototype)
bool IsMapIterator() const
ExtensionConfiguration(int name_count, const char *names[])
IndexedPropertyHandlerConfiguration(IndexedPropertyGetterCallback getter, IndexedPropertySetterCallback setter, IndexedPropertyDescriptorCallback descriptor, IndexedPropertyDeleterCallback deleter, IndexedPropertyEnumeratorCallback enumerator, IndexedPropertyDefinerCallback definer, Local< Value > data=Local< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
bool IsSharedCrossOrigin() const
V8_WARN_UNUSED_RESULT Maybe< PropertyAttribute > GetPropertyAttributes(Local< Context > context, Local< Value > key)
V8_WARN_UNUSED_RESULT MaybeLocal< Int32 > ToInt32(Local< Context > context) const
NamedPropertyHandlerConfiguration(GenericNamedPropertyGetterCallback getter, GenericNamedPropertySetterCallback setter, GenericNamedPropertyQueryCallback query, GenericNamedPropertyDeleterCallback deleter, GenericNamedPropertyEnumeratorCallback enumerator, GenericNamedPropertyDefinerCallback definer, GenericNamedPropertyDescriptorCallback descriptor, Local< Value > data=Local< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
static ScriptStreamingTask * StartStreamingScript(Isolate *isolate, StreamedSource *source, CompileOptions options=kNoCompileOptions)
~AllowJavascriptExecutionScope()
void GetHeapStatistics(HeapStatistics *heap_statistics)
Local< Value > GetResourceName()
static Local< Symbol > GetIterator(Isolate *isolate)
static MaybeLocal< WasmModuleObject > DeserializeOrCompile(Isolate *isolate, MemorySpan< const uint8_t > serialized_module, MemorySpan< const uint8_t > wire_bytes)
V8_INLINE Local< PrimitiveArray > HostDefinedOptions() const
virtual void ResetHandleInNonTracingGC(const v8::TracedGlobal< v8::Value > &handle)
virtual const char * data() const =0
Local< String >(* WasmLoadSourceMapCallback)(Isolate *isolate, const char *name)
static Local< StackTrace > GetStackTrace(Local< Value > exception)
void SetAlignedPointerInInternalField(int index, void *value)
V8_INLINE void Set(uint32_t i)
void SetAddHistogramSampleFunction(AddHistogramSampleCallback)
V8_INLINE Isolate * GetIsolate() const
size_t total_physical_size()
bool BooleanValue(Isolate *isolate) const
virtual void OnModuleCompiled(CompiledWasmModule compiled_module)=0
V8_INLINE void SetWeak(P *parameter, typename WeakCallbackInfo< P >::Callback callback, WeakCallbackType type)
void SetJitCodeEventHandler(JitCodeEventOptions options, JitCodeEventHandler event_handler)
ResourceConstraints constraints
void MoveOnlyTypeForCPP03
Local< Array > AsArray() const
size_t ByteLength() const
int GetScriptLineNumber() const
void operator=(const SealHandleScope &)=delete
V8_INLINE bool IsEmpty() const
static const int kInternalFieldCount
V8_INLINE void AnnotateStrongRetainer(const char *label)
static V8_INLINE Int32Array * Cast(Value *obj)
void SetRAILMode(RAILMode rail_mode)
bool IsDetachable() const
static Local< Int16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
virtual ~ExternalResourceVisitor()=default
static Local< Context > New(Isolate *isolate, ExtensionConfiguration *extensions=nullptr, MaybeLocal< ObjectTemplate > global_template=MaybeLocal< ObjectTemplate >(), MaybeLocal< Value > global_object=MaybeLocal< Value >(), DeserializeInternalFieldsCallback internal_fields_deserializer=DeserializeInternalFieldsCallback(), MicrotaskQueue *microtask_queue=nullptr)
static Local< Object > New(Isolate *isolate, Local< Value > prototype_or_null, Local< Name > *names, Local< Value > *values, size_t length)
size_t code_range_size_in_bytes() const
size_t external_script_source_size()
static const int kDataIndex
void SetTreatArrayBufferViewsAsHostObjects(bool mode)
virtual void EnqueueMicrotask(Isolate *isolate, Local< Function > microtask)=0
Isolate & operator=(const Isolate &)=delete
#define V8_DEPRECATE_SOON(message, declarator)
static V8_INLINE Set * Cast(Value *obj)
void DecreaseAllocatedSize(size_t bytes)
V8_EXPORT bool ShouldThrowOnError(v8::internal::Isolate *isolate)
bool MakeExternal(ExternalStringResource *resource)
static Local< Array > New(Isolate *isolate, int length=0)
static Local< Symbol > ForApi(Isolate *isolate, Local< String > name)
V8_INLINE Local< Primitive > Undefined(Isolate *isolate)
static V8_WARN_UNUSED_RESULT MaybeLocal< Module > CompileModule(Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
size_t max_old_generation_size_in_bytes() const
static V8_INLINE Int32 * Cast(v8::Value *obj)
MicrotasksScope(const MicrotasksScope &)=delete
internal::Address * implicit_args_
bool IsArrayBuffer() const
static Local< Uint8Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
bool(* WasmThreadsEnabledCallback)(Local< Context > context)
V8_INLINE bool ShouldThrowOnError() const
V8_INLINE bool operator!=(const TracedGlobal< S > &that) const
~ExternalStringResource() override=default
static void SetReturnAddressLocationResolver(ReturnAddressLocationResolver return_address_resolver)
int GetFrameCount() const
void operator=(const ValueSerializer &)=delete
virtual void FreeBufferMemory(void *buffer)
friend class PersistentValueMapBase
MicrotaskQueue & operator=(const MicrotaskQueue &)=delete
V8_WARN_UNUSED_RESULT Maybe< bool > SetLazyDataProperty(Local< Context > context, Local< Name > name, AccessorNameGetterCallback getter, Local< Value > data=Local< Value >(), PropertyAttribute attributes=None, SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
static void InitializePlatform(Platform *platform)
PersistentBase(const PersistentBase &other)=delete
V8_INLINE Local< Integer > ResourceColumnOffset() const
bool IsWebAssemblyCompiledModule() const
V8_INLINE ReturnValue< T > GetReturnValue() const
uint32_t GetWireFormatVersion() const
virtual size_t length() const =0
static V8_INLINE Local< Context > CreationContext(const PersistentBase< Object > &object)
virtual void VisitExternalString(Local< String > string)
static constexpr size_t kMaxLength
void(* AccessorGetterCallback)(Local< String > property, const PropertyCallbackInfo< Value > &info)
bool(* AllowCodeGenerationFromStringsCallback)(Local< Context > context, Local< String > source)
size_t ByteLength() const
Value(const Value &)=delete
static V8_INLINE void * GetAlignedPointerFromInternalField(const PersistentBase< Object > &object, int index)
static const int kTheHoleValueRootIndex
V8_INLINE PromiseRejectEvent GetEvent() const
void SetClient(std::shared_ptr< Client > client)
V8_INLINE ReturnValue(const ReturnValue< S > &that)
void WriteRawBytes(const void *source, size_t length)
V8_WARN_UNUSED_RESULT bool ReadUint64(uint64_t *value)
V8_INLINE bool operator!=(const Local< S > &that) const
void SetAcceptAnyReceiver(bool value)
static Local< Float64Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
size_t initial_old_generation_size_in_bytes() const
~WasmModuleObjectBuilderStreaming()=default
static MaybeLocal< BigInt > NewFromWords(Local< Context > context, int sign_bit, int word_count, const uint64_t *words)
static constexpr int kFlagCount
static MaybeLocal< FunctionTemplate > FromSnapshot(Isolate *isolate, size_t index)
TransferrableModule(TransferrableModule &&src)=default
void operator=(const PersistentBase &)=delete
PrivateData * get_private() const
static const int kReturnValueDefaultValueIndex
bool(* AccessCheckCallback)(Local< Context > accessing_context, Local< Object > accessed_object, Local< Value > data)
void set_max_young_generation_size_in_bytes(size_t limit)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Get(Local< Context > context, Local< Value > key)
static Local< Private > New(Isolate *isolate, Local< String > name=Local< String >())
V8_INLINE Local< Integer > ScriptID() const
void IncreaseHeapLimitForDebugging()
StartupData * snapshot_blob
MaybeLocal< Module >(* ResolveCallback)(Local< Context > context, Local< String > specifier, Local< Module > referrer)
static const int kNodeStateIsWeakValue
Local< Symbol > ValueOf() const
void TransferArrayBuffer(uint32_t transfer_id, Local< ArrayBuffer > array_buffer)
static V8_INLINE bool IsExternalTwoByteString(int instance_type)
static Local< Int32Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
Local< Boolean > ToBoolean(Isolate *isolate) const
SnapshotCreator(Isolate *isolate, const intptr_t *external_references=nullptr, StartupData *existing_blob=nullptr)
static bool EnableWebAssemblyTrapHandler(bool use_v8_signal_handler)
void set_initial_old_generation_size_in_bytes(size_t initial_size)
V8_INLINE Local< Primitive > Null(Isolate *isolate)
V8_INLINE Source(Local< String > source_string, CachedData *cached_data=nullptr)
V8_INLINE bool operator==(const PersistentBase< S > &that) const
friend class PersistentBase
virtual void Free(void *data, size_t length)=0
static const int kReturnValueIndex
static void SetFlagsFromCommandLine(int *argc, char **argv, bool remove_flags)
V8_INLINE bool operator!=(const Maybe &other) const
bool has_configurable() const
ArrayBuffer::Allocator * GetArrayBufferAllocator()
Local< String > GetScriptNameOrSourceURL() const
bool HasInstance(Local< Value > object)
MemoryRange embedded_code_range
size_t number_of_detached_contexts()
static Local< Map > New(Isolate *isolate)
Global< T > & operator=(Global< S > &&rhs)
void(* IndexedPropertyQueryCallback)(uint32_t index, const PropertyCallbackInfo< Integer > &info)
Local< Context > GetCurrentContext()
virtual void EnqueueMicrotask(v8::Isolate *isolate, MicrotaskCallback callback, void *data=nullptr)=0
void(* GenericNamedPropertyGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
Local< Value > GetHandler()
static V8_INLINE bool HasHeapObjectTag(const internal::Address value)
virtual void ResetToBookmark()
void RemoveNearHeapLimitCallback(NearHeapLimitCallback callback, size_t heap_limit)
static bool PCIsInV8(const UnwindState &unwind_state, void *pc)
#define V8_PROMISE_INTERNAL_FIELD_COUNT
Local< Value > get() const
V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local< S > *out) const
static V8_INLINE SymbolObject * Cast(Value *obj)
static const int kNativeContextEmbedderDataOffset
bool IsGeneratorObject() const
static const int kInferShouldThrowMode
V8_INLINE bool operator!=(const Maybe &other) const
V8_INLINE Local< Object > This() const
void SetAccessorProperty(Local< Name > name, Local< FunctionTemplate > getter=Local< FunctionTemplate >(), Local< FunctionTemplate > setter=Local< FunctionTemplate >(), PropertyAttribute attribute=None, AccessControl settings=DEFAULT)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > StackTrace(Local< Context > context) const
ValueSerializer(const ValueSerializer &)=delete
EscapableHandleScope(Isolate *isolate)
void(* callback)(Local< Object > holder, int index, StartupData payload, void *data)
Maybe< bool > HasPrivate(Local< Context > context, Local< Private > key)
static V8_INLINE int GetInstanceType(const internal::Address obj)
static V8_WARN_UNUSED_RESULT MaybeLocal< RegExp > New(Local< Context > context, Local< String > pattern, Flags flags)
V8_WARN_UNUSED_RESULT V8_INLINE bool To(T *out) const
bool has_enumerable() const
V8_INLINE bool operator==(const Maybe &other) const
static V8_INLINE void CheckInitialized(v8::Isolate *isolate)
Local< Value > Name() const
void WriteUint64(uint64_t value)
MaybeLocal< Array > PreviewEntries(bool *is_key_value)
static V8_INLINE NumberObject * Cast(Value *obj)
V8_WARN_UNUSED_RESULT Maybe< bool > SetAccessor(Local< Context > context, Local< Name > name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter=nullptr, MaybeLocal< Value > data=MaybeLocal< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None, SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
void SetInternalFieldCount(int value)
Maybe< bool > SetPrivate(Local< Context > context, Local< Private > key, Local< Value > value)
HandleScope(Isolate *isolate)
static V8_INLINE constexpr internal::Address IntToSmi(int value)
void SetPromiseHook(PromiseHook hook)
static bool TryUnwindV8Frames(const UnwindState &unwind_state, RegisterState *register_state, const void *stack_base)
void IsolateInForegroundNotification()
CallbackFunction callback
MicrotasksScope(Isolate *isolate, Type type)
Maybe< bool > InstanceOf(Local< Context > context, Local< Object > object)
void SetAtomicsWaitCallback(AtomicsWaitCallback callback, void *data)
V8_WARN_UNUSED_RESULT Maybe< bool > DefineOwnProperty(Local< Context > context, Local< Name > key, Local< Value > value, PropertyAttribute attributes=None)
Local< Value > GetSecurityToken()
bool HasIndexedLookupInterceptor()
V8_INLINE bool IsJust() const
V8_INLINE Isolate * GetIsolate() const
Isolate * GetIsolate() const
bool(* EntropySource)(unsigned char *buffer, size_t length)
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewInstanceWithSideEffectType(Local< Context > context, int argc, Local< Value > argv[], SideEffectType side_effect_type=SideEffectType::kHasSideEffect) const
void RemoveMessageListeners(MessageCallback that)
void SetAccessor(Local< String > name, AccessorGetterCallback getter, AccessorSetterCallback setter=nullptr, Local< Value > data=Local< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None, Local< AccessorSignature > signature=Local< AccessorSignature >(), SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
V8_WARN_UNUSED_RESULT MaybeLocal< Array > GetPropertyNames(Local< Context > context, KeyCollectionMode mode, PropertyFilter property_filter, IndexFilter index_filter, KeyConversionMode key_conversion=KeyConversionMode::kKeepNumbers)
void SetAllowCodeGenerationFromStringsCallback(AllowCodeGenerationFromStringsCallback callback)
size_t NumberOfHeapSpaces()
V8_INLINE TracedGlobal & operator=(const TracedGlobal &rhs)
const char * operator*() const
V8_INLINE void SetData(uint32_t slot, void *data)
DeserializeInternalFieldsCallback DeserializeEmbedderFieldsCallback
int GetEndPosition() const
void ConfigureDefaults(uint64_t physical_memory, uint64_t virtual_memory_limit)
static V8_INLINE Symbol * Cast(Value *obj)
static Local< Integer > NewFromUnsigned(Isolate *isolate, uint32_t value)
static Local< Uint32Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
TryCatch(Isolate *isolate)
UnwindState GetUnwindState()
V8_INLINE bool IsNull() const
MaybeLocal< T > GetDataFromSnapshotOnce(size_t index)
const uint16_t * operator*() const
ValueSerializer(Isolate *isolate, Delegate *delegate)
virtual void TraceEpilogue(TraceSummary *trace_summary)
V8_INLINE MaybeLocal< T > EscapeMaybe(MaybeLocal< T > value)
const char ** begin() const
size_t AllocationLength() const
V8_WARN_UNUSED_RESULT MaybeLocal< Value > GetOwnPropertyDescriptor(Local< Context > context, Local< Name > key)
Value(Isolate *isolate, Local< v8::Value > obj)
void operator=(const ExternalStringResourceBase &)=delete
void SetHostInitializeImportMetaObjectCallback(HostInitializeImportMetaObjectCallback callback)
V8_INLINE Unlocker(Isolate *isolate)
bool ContainsOnlyOneByte() const
static Local< Module > CreateSyntheticModule(Isolate *isolate, Local< String > module_name, const std::vector< Local< String >> &export_names, SyntheticModuleEvaluationSteps evaluation_steps)
void(* AccessorNameSetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
V8_WARN_UNUSED_RESULT MaybeLocal< BigInt > ToBigInt(Local< Context > context) const
void SetWasmInstanceCallback(ExtensionCallback callback)
Local< Array > AsArray() const
MaybeLocal< String >(* ModifyCodeGenerationFromStringsCallback)(Local< Context > context, Local< Value > source)
virtual void Unlock() const
static CachedData * CreateCodeCacheForFunction(Local< Function > function)
V8_INLINE TracedGlobal(TracedGlobal &&other)
void(* MicrotasksCompletedCallbackWithData)(Isolate *, void *)
bool IsSymbolObject() const
~ExternalOneByteStringResource() override=default
void Abort(MaybeLocal< Value > exception)
static Local< Number > New(Isolate *isolate, double value)
V8_INLINE Local< Object > Holder() const
void SetAddCrashKeyCallback(AddCrashKeyCallback)
static V8_INLINE T ReadRawField(internal::Address heap_object_ptr, int offset)
static const int kReturnValueDefaultValueIndex
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, Local< Value > key)
int WriteOneByte(Isolate *isolate, uint8_t *buffer, int start=0, int length=-1, int options=NO_OPTIONS) const
Local< Context > GetEnteredOrMicrotaskContext()
#define V8_UNLIKELY(condition)
static const int kEmbedderDataArrayHeaderSize
V8_INLINE bool operator==(const Local< S > &that) const
V8_WARN_UNUSED_RESULT Maybe< bool > HasRealNamedCallbackProperty(Local< Context > context, Local< Name > key)
static V8_WARN_UNUSED_RESULT MaybeLocal< String > NewFromOneByte(Isolate *isolate, const uint8_t *data, NewStringType type=NewStringType::kNormal, int length=-1)
V8_INLINE TracedGlobal & operator=(TracedGlobal &&rhs)
virtual size_t length() const =0
static Local< Value > New(Isolate *isolate, bool value)
TransferrableModule(const TransferrableModule &src)=delete
uint32_t GetNumberOfEmbedderDataFields()
void set_stack_limit(uint32_t *value)
V8_WARN_UNUSED_RESULT Maybe< bool > ReadHeader(Local< Context > context)
const intptr_t * external_references
V8_INLINE Local< T > ToLocalChecked()
void SetAlignedPointerInEmbedderData(int index, void *value)
static const int kDontThrow
void SetErrorMessageForCodeGenerationFromStrings(Local< String > message)
static void InitializeExternalStartupData(const char *directory_path)
void SetWasmLoadSourceMapCallback(WasmLoadSourceMapCallback callback)
static Local< Symbol > GetSplit(Isolate *isolate)
static const int kUndefinedValueRootIndex
V8_WARN_UNUSED_RESULT MaybeLocal< Value > GetRealNamedPropertyInPrototypeChain(Local< Context > context, Local< Name > key)
static V8_INLINE void SetEmbedderData(v8::Isolate *isolate, uint32_t slot, void *data)
size_t NumberOfTrackedHeapObjectTypes()
void operator=(const SnapshotCreator &)=delete
void Set(Local< Name > name, Local< Data > value, PropertyAttribute attributes=None)
static const int kOddballType
static const int kInternalFieldCount
void(* JitCodeEventHandler)(const JitCodeEvent *event)
static V8_INLINE String * Cast(v8::Value *obj)
bool HasNamedLookupInterceptor()
virtual void VisitTracedGlobalHandle(const TracedGlobal< Value > &value)=0
void(* GenericNamedPropertyDescriptorCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
V8_INLINE FunctionCallbackInfo(internal::Address *implicit_args, internal::Address *values, int length)
static V8_INLINE External * Cast(Value *obj)
static MaybeLocal< Function > New(Local< Context > context, FunctionCallback callback, Local< Value > data=Local< Value >(), int length=0, ConstructorBehavior behavior=ConstructorBehavior::kAllow, SideEffectType side_effect_type=SideEffectType::kHasSideEffect)
void VisitExternalResources(ExternalResourceVisitor *visitor)
V8_INLINE bool IsWeak() const
void(* PromiseHook)(PromiseHookType type, Local< Promise > promise, Local< Value > parent)
static void SetFlagsFromString(const char *str, size_t length)
SealHandleScope(const SealHandleScope &)=delete
void SetCounterFunction(CounterLookupCallback)
virtual Local< FunctionTemplate > GetNativeFunctionTemplate(Isolate *isolate, Local< String > name)
void SetClassName(Local< String > name)
Local< Value > GetName() const
bool IsUint16Array() const
void OnBytesReceived(const uint8_t *, size_t size)
static V8_INLINE Integer * Cast(v8::Value *obj)
friend class PropertyCallbackInfo
bool IsModuleNamespaceObject() const
void AddNearHeapLimitCallback(NearHeapLimitCallback callback, void *data)
TracedGlobal< T > & operator=(const TracedGlobal< S > &rhs)
Local< BigInt > ValueOf() const
virtual size_t GetMoreData(const uint8_t **src)=0
MaybeLocal< Value >(* SyntheticModuleEvaluationSteps)(Local< Context > context, Local< Module > module)
static const int kFalseValueRootIndex
static constexpr bool kRequiresExplicitDestruction
void set_configurable(bool configurable)
void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback)
bool StringEquals(Local< String > str)
virtual bool AdvanceTracing(double deadline_in_ms)=0
bool IsUint32Array() const
friend Maybe< U > Nothing()
void EnqueueMicrotask(Local< Function > microtask)
static V8_INLINE ArrayBuffer * Cast(Value *obj)
static V8_INLINE Local< T > Cast(Local< S > that)
void TransferArrayBuffer(uint32_t transfer_id, Local< ArrayBuffer > array_buffer)
V8_INLINE bool operator==(const Maybe &other) const
void Set(Isolate *isolate, Local< S > handle)
V8_INLINE Global(Global &&other)
void SetSyntheticModuleExport(Local< String > export_name, Local< Value > export_value)
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewRemoteInstance()
#define V8_DEPRECATED(message, declarator)
void Set(Isolate *isolate, int index, Local< Primitive > item)
static const int kShouldThrowOnErrorIndex
Local< Value > GetModuleNamespace()
Extension(const Extension &)=delete
size_t ByteLength() const
JitCodeEventHandler code_event_handler
size_t CopyContents(void *dest, size_t byte_length)
V8_WARN_UNUSED_RESULT Maybe< bool > Set(Local< Context > context, uint32_t index, Local< Value > value)
V8_INLINE Local(Local< S > that)
V8_INLINE bool IsEmpty() const
void SetCreateHistogramFunction(CreateHistogramCallback)
V8_INLINE void SetFinalizationCallback(void *parameter, WeakCallbackInfo< void >::Callback callback)
bool HasTerminated() const
static V8_INLINE BooleanObject * Cast(Value *obj)
void(* FunctionCallback)(const FunctionCallbackInfo< Value > &info)
IndexedPropertyHandlerConfiguration(IndexedPropertyGetterCallback getter=nullptr, IndexedPropertySetterCallback setter=nullptr, IndexedPropertyQueryCallback query=nullptr, IndexedPropertyDeleterCallback deleter=nullptr, IndexedPropertyEnumeratorCallback enumerator=nullptr, Local< Value > data=Local< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
IndexedPropertyQueryCallback query
ArrayBuffer::Allocator * array_buffer_allocator
Local< Promise > GetPromise()
static const int kEmptyStringRootIndex
NamedPropertyHandlerConfiguration(GenericNamedPropertyGetterCallback getter=nullptr, GenericNamedPropertySetterCallback setter=nullptr, GenericNamedPropertyQueryCallback query=nullptr, GenericNamedPropertyDeleterCallback deleter=nullptr, GenericNamedPropertyEnumeratorCallback enumerator=nullptr, Local< Value > data=Local< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
AllowJavascriptExecutionScope(Isolate *isolate)
Source & operator=(const Source &)=delete
static MaybeLocal< Context > FromSnapshot(Isolate *isolate, size_t context_snapshot_index, DeserializeInternalFieldsCallback embedder_fields_deserializer=DeserializeInternalFieldsCallback(), ExtensionConfiguration *extensions=nullptr, MaybeLocal< Value > global_object=MaybeLocal< Value >(), MicrotaskQueue *microtask_queue=nullptr)
void TerminateExecution()
static V8_INLINE BigIntObject * Cast(Value *obj)
static Local< External > New(Isolate *isolate, void *value)
const String::ExternalOneByteStringResource * source() const
MicrotaskQueue(const MicrotaskQueue &)=delete
static Local< SharedArrayBuffer > New(Isolate *isolate, size_t byte_length)
void AutomaticallyRestoreInitialHeapLimit(double threshold_percent=0.5)
static V8_INLINE Name * Cast(Value *obj)
SafeForTerminationScope(v8::Isolate *isolate)
int Write(Isolate *isolate, uint16_t *buffer, int start=0, int length=-1, int options=NO_OPTIONS) const
void SetLazyDataProperty(Local< Name > name, AccessorNameGetterCallback getter, Local< Value > data=Local< Value >(), PropertyAttribute attribute=None, SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
Locker(const Locker &)=delete
bool IsCodeGenerationFromStringsAllowed()
bool IsNativeError() const
virtual ~Allocator()=default
ExternalOneByteStringResource()=default
virtual bool SetBookmark()
Local< Promise > GetPromise()
V8_INLINE Local< Object > Holder() const
V8_INLINE ~EscapableHandleScope()=default
bool AddMessageListenerWithErrorLevel(MessageCallback that, int message_levels, Local< Value > data=Local< Value >())
Local< Value > GetScriptResourceName() const
void AddGCPrologueCallback(GCCallback callback, GCType gc_type_filter=kGCTypeAll)
static Local< Symbol > GetHasInstance(Isolate *isolate)
static V8_INLINE void Copy(const Persistent< S, M > &source, NonCopyablePersistent *dest)
V8_WARN_UNUSED_RESULT MaybeLocal< Array > GetPropertyNames(Local< Context > context)
V8_WARN_UNUSED_RESULT MaybeLocal< String > ToDetailString(Local< Context > context) const
static V8_WARN_UNUSED_RESULT Maybe< bool > Cleanup(Local< FinalizationGroup > finalization_group)
V8_INLINE Isolate * GetIsolate() const
ValueDeserializer(Isolate *isolate, const uint8_t *data, size_t size, Delegate *delegate)
void * AllocationBase() const
static const int kIsolateIndex
virtual void PerformCheckpoint(Isolate *isolate)=0
static bool IsRunningMicrotasks(Isolate *isolate)
void set_initial_young_generation_size_in_bytes(size_t initial_size)
static Local< StackTrace > CurrentStackTrace(Isolate *isolate, int frame_limit, StackTraceOptions options=kDetailed)
internal::Address * args_
static V8_WARN_UNUSED_RESULT MaybeLocal< String > NewFromUtf8(Isolate *isolate, const char *data, NewStringType type=NewStringType::kNormal, int length=-1)
Local< ObjectTemplate > InstanceTemplate()
static V8_WARN_UNUSED_RESULT MaybeLocal< Value > New(Local< Context > context, double time)
bool configurable() const
V8_EXPORT internal::Isolate * IsolateFromNeverReadOnlySpaceObject(Address obj)
void(* AddCrashKeyCallback)(CrashKeyId id, const std::string &value)
ScriptOrigin GetScriptOrigin() const
void SetAbortScriptExecution(AbortScriptExecutionCallback callback)
PropertyDescriptor(const PropertyDescriptor &)=delete
DisallowJavascriptExecutionScope & operator=(const DisallowJavascriptExecutionScope &)=delete
void EnqueueMicrotask(MicrotaskCallback callback, void *data=nullptr)
void AddGCEpilogueCallback(GCCallbackWithData callback, void *data=nullptr, GCType gc_type_filter=kGCTypeAll)
int GetIdentityHash() const
V8_INLINE Local< Boolean > False(Isolate *isolate)
virtual ~Client()=default
void SetPrototypeProviderTemplate(Local< FunctionTemplate > prototype_provider)
void SetSecurityToken(Local< Value > token)
StreamedSource(const StreamedSource &)=delete
static Local< ArrayBuffer > New(Isolate *isolate, void *data, size_t byte_length, ArrayBufferCreationMode mode=ArrayBufferCreationMode::kExternalized)
V8_INLINE ScriptOriginOptions(int flags)
friend class TracedGlobal
static const int kEmbedderFieldCount
bool IsNumberObject() const
void TransferSharedArrayBuffer(uint32_t id, Local< SharedArrayBuffer > shared_array_buffer)
int Utf8Length(Isolate *isolate) const
size_t source_length() const
EmbedderHeapTracer * GetEmbedderHeapTracer()
static void SetDcheckErrorHandler(DcheckErrorCallback that)
V8_WARN_UNUSED_RESULT Maybe< bool > HasRealIndexedProperty(Local< Context > context, uint32_t index)
Local< UnboundScript > GetUnboundScript()
static Allocator * NewDefaultAllocator()
static Isolate * GetCurrent()
V8_WARN_UNUSED_RESULT MaybeLocal< Function > GetFunction(Local< Context > context)
SuppressMicrotaskExecutionScope(Isolate *isolate)
TransferrableModule & operator=(TransferrableModule &&src)=default
Local< String > GetScriptName() const
void RegisterEmbedderReference(const TracedGlobal< v8::Value > &ref)
AllowJavascriptExecutionScope & operator=(const AllowJavascriptExecutionScope &)=delete
V8_INLINE void ClearWeak()
void GetCodeRange(void **start, size_t *length_in_bytes)
V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin=false, bool is_opaque=false, bool is_wasm=false, bool is_module=false)
V8_INLINE T ToChecked() const
static Local< Integer > New(Isolate *isolate, int32_t value)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Evaluate(Local< Context > context)
void SetOOMErrorHandler(OOMErrorCallback that)
V8_INLINE bool IsEmpty() const
JSEntryStub js_entry_stub
V8_WARN_UNUSED_RESULT Maybe< double > NumberValue(Local< Context > context) const
void SetPrepareStackTraceCallback(PrepareStackTraceCallback callback)
static internal::Address * CreateHandle(internal::Isolate *isolate, internal::Address value)
Local< Script > BindToCurrentContext()
V8_WARN_UNUSED_RESULT MaybeLocal< Integer > ToInteger(Local< Context > context) const
void operator=(const EscapableHandleScope &)=delete
static Local< Value > SyntaxError(Local< String > message)
void IsolateInBackgroundNotification()
IndexedPropertyEnumeratorCallback enumerator
V8_INLINE void Set(bool value)
void SetHostCleanupFinalizationGroupCallback(HostCleanupFinalizationGroupCallback callback)
V8_INLINE ScriptOriginOptions Options() const
void SetAllowWasmCodeGenerationCallback(AllowWasmCodeGenerationCallback callback)
void SetWasmModuleCallback(ExtensionCallback callback)
void SetHandler(const IndexedPropertyHandlerConfiguration &configuration)
SerializeInternalFieldsCallback(CallbackFunction function=nullptr, void *data_arg=nullptr)
void SetExpectInlineWasm(bool allow_inline_wasm)
void SetSecondPassCallback(Callback callback) const
static V8_INLINE constexpr bool IsValidSmi(intptr_t value)
static V8_INLINE DataView * Cast(Value *obj)
int WriteUtf8(Isolate *isolate, char *buffer, int length=-1, int *nchars_ref=nullptr, int options=NO_OPTIONS) const
V8_INLINE Isolate * GetIsolate() const
V8_INLINE void Check() const
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)
Local< Value > set() const
WasmModuleObjectBuilderStreaming(Isolate *isolate)
PropertyDescriptor(Local< Value > value, bool writable)
static V8_INLINE Promise * Cast(Value *obj)
Local< Primitive > Get(Isolate *isolate, int index)
Maybe< bool > SetIntegrityLevel(Local< Context > context, IntegrityLevel level)
void operator=(const ValueDeserializer &)=delete
V8_WARN_UNUSED_RESULT bool ReadDouble(double *value)
void(* UseCounterCallback)(Isolate *isolate, UseCounterFeature feature)
V8_INLINE bool operator!=(const Local< S > &that) const
#define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
bool IsFloat64Array() const
V8_INLINE void * GetInternalField(int index) const
static const int kIsolateIndex
#define V8_WARN_UNUSED_RESULT
Local< String > GetConstructorName()
#define V8_INTRINSICS_LIST(F)
static const int kEmbedderFieldCount
virtual void RegisterV8References(const std::vector< std::pair< void *, void *> > &embedder_fields)=0
static V8_INLINE internal::Address * GetRoot(v8::Isolate *isolate, int index)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Call(Local< Context > context, Local< Value > recv, int argc, Local< Value > argv[])
size_t bytecode_and_metadata_size()
V8_WARN_UNUSED_RESULT std::pair< uint8_t *, size_t > Release()
GenericNamedPropertyDeleterCallback deleter
void SetWasmThreadsEnabledCallback(WasmThreadsEnabledCallback callback)
IndexedPropertyDescriptorCallback descriptor
V8_INLINE Local< Value > Get() const
void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback)
constexpr size_t size() const
V8_INLINE void * GetData(uint32_t slot)
static const int kFullStringRepresentationMask
void * operator new[](size_t size)=delete
void *(* CreateHistogramCallback)(const char *name, int min, int max, size_t buckets)
ValueDeserializer(const ValueDeserializer &)=delete
static void SetSnapshotDataBlob(StartupData *startup_blob)
void RemoveGCPrologueCallback(GCCallbackWithData, void *data=nullptr)
void WriteDouble(double value)
uintptr_t JSStackComparableAddress() const
static Local< Uint16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static V8_INLINE void * GetAlignedPointerFromInternalField(const TracedGlobal< Object > &object, int index)
SuppressMicrotaskExecutionScope(MicrotaskQueue *microtask_queue)
V8_WARN_UNUSED_RESULT Maybe< bool > Resolve(Local< Context > context, Local< Value > value)
const char ** dependencies() const
void(* GenericNamedPropertyDefinerCallback)(Local< Name > property, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)
Local< Value > GetBoundFunction() const
static Local< Uint8Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
void MarkAsUndetectable()
static V8_INLINE Signature * Cast(Data *data)
ExternalStringResourceBase(const ExternalStringResourceBase &)=delete
V8_WARN_UNUSED_RESULT bool ReadRawBytes(size_t length, const void **data)
static V8_WARN_UNUSED_RESULT MaybeLocal< Script > Compile(Local< Context > context, Source *source, CompileOptions options=kNoCompileOptions, NoCacheReason no_cache_reason=kNoCacheNoReason)
static MaybeLocal< ObjectTemplate > FromSnapshot(Isolate *isolate, size_t index)
Local< Value > GetInferredName() const
void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback)
ValueSerializer(Isolate *isolate)
bool IsAsyncFunction() const
virtual ~ExternalStringResourceBase()=default
static void * JSStackComparableAddress(TryCatch *handler)
uint64_t Uint64Value(bool *lossless=nullptr) const
GenericNamedPropertySetterCallback setter
V8_WARN_UNUSED_RESULT MaybeLocal< Number > ToNumber(Local< Context > context) const
void set_auto_enable(bool value)
virtual void VisitPersistentHandle(Persistent< Value > *value, uint16_t class_id)
MemorySpan< const uint8_t > GetWireBytesRef()
Global(const Global &)=delete
static const int kThisIndex
SealHandleScope(Isolate *isolate)
V8_WARN_UNUSED_RESULT Maybe< bool > HasRealNamedProperty(Local< Context > context, Local< Name > key)
void SetAbortOnUncaughtExceptionCallback(AbortOnUncaughtExceptionCallback callback)
virtual void * ReallocateBufferMemory(void *old_buffer, size_t size, size_t *actual_size)
void SetMicrotasksPolicy(MicrotasksPolicy policy)
size_t total_available_size()
static const int kUndefinedOddballKind
bool IsTypedArray() const
SafeForTerminationScope & operator=(const SafeForTerminationScope &)=delete
static V8_INLINE Private * Cast(Data *data)
static V8_INLINE Local< T > New(Isolate *isolate, Local< T > that)
static CachedData * CreateCodeCache(Local< UnboundScript > unbound_script)
virtual void EnterFinalPause(EmbedderStackState stack_state)=0
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, uint32_t index)
bool(* AllowWasmCodeGenerationCallback)(Local< Context > context, Local< String > source)
DeserializeInternalFieldsCallback(CallbackFunction function=nullptr, void *data_arg=nullptr)
void SetPrivate(Local< Private > name, Local< Data > value, PropertyAttribute attributes=None)
void RemoveGCEpilogueCallback(GCCallbackWithData callback, void *data=nullptr)
V8_INLINE uint16_t WrapperClassId() const
size_t AddData(Local< T > object)
WasmStreaming(std::unique_ptr< WasmStreamingImpl > impl)
Local< String > GetModuleRequest(int i) const
Local< Value > GetDebugName() const
V8_INLINE Persistent(Isolate *isolate, Local< S > that)
TracedGlobal< T > & operator=(TracedGlobal< S > &&rhs)
WeakCallbackInfo(Isolate *isolate, T *parameter, void *embedder_fields[kEmbedderFieldsInWeakCallback], Callback *callback)
size_t AddTemplate(Local< Template > template_obj)
void Copy(const Persistent< S, M2 > &that)
static V8_INLINE FunctionTemplate * Cast(Data *data)
void(* IndexedPropertyDefinerCallback)(uint32_t index, const PropertyDescriptor &desc, const PropertyCallbackInfo< Value > &info)
void Reset(Isolate *isolate, const Local< S > &other)
V8_INLINE bool IsConstructCall() const
bool IsInt16Array() const
int *(* CounterLookupCallback)(const char *name)
void(* AccessorNameGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)
static const int kStringEncodingMask
V8_INLINE void SetEmptyString()
V8_WARN_UNUSED_RESULT Maybe< bool > Set(Local< Context > context, Local< Value > key, Local< Value > value)
static const int kHolderIndex
V8_WARN_UNUSED_RESULT Maybe< int32_t > Int32Value(Local< Context > context) const
void Inherit(Local< FunctionTemplate > parent)
bool IsHeapLimitIncreasedForDebugging()
static MaybeLocal< WasmModuleObject > FromTransferrableModule(Isolate *isolate, const TransferrableModule &)
AllowJavascriptExecutionScope(const AllowJavascriptExecutionScope &)=delete
static V8_INLINE RegExp * Cast(Value *obj)
static V8_INLINE Uint16Array * Cast(Value *obj)
std::unique_ptr< const uint8_t[]> buffer
void SetHostImportModuleDynamicallyCallback(HostImportModuleDynamicallyCallback callback)
static V8_WARN_UNUSED_RESULT MaybeLocal< Script > Compile(Local< Context > context, Local< String > source, ScriptOrigin *origin=nullptr)
CompiledWasmModule GetCompiledModule()
V8_INLINE HandleScope()=default
void SetSupportsLegacyWireFormat(bool supports_legacy_wire_format)
V8_INLINE int64_t AdjustAmountOfExternalAllocatedMemory(int64_t change_in_bytes)
void Abort(MaybeLocal< Value > exception)
V8_WARN_UNUSED_RESULT MaybeLocal< Set > Add(Local< Context > context, Local< Value > key)
Local< UnboundScript > script
virtual Maybe< uint32_t > GetWasmModuleTransferId(Isolate *isolate, Local< WasmModuleObject > module)
SnapshotCreator(const SnapshotCreator &)=delete
~DisallowJavascriptExecutionScope()
size_t initial_young_generation_size_in_bytes() const
StreamedSource(std::unique_ptr< ExternalSourceStream > source_stream, Encoding encoding)
PropertyHandlerFlags flags
GenericNamedPropertyQueryCallback query
static Local< Object > New(Isolate *isolate)
void(* GCCallbackWithData)(Isolate *isolate, GCType type, GCCallbackFlags flags, void *data)
static V8_WARN_UNUSED_RESULT MaybeLocal< Resolver > New(Local< Context > context)
void(* IndexedPropertySetterCallback)(uint32_t index, Local< Value > value, const PropertyCallbackInfo< Value > &info)
V8_INLINE Persistent(const Persistent &that)
V8_INLINE Persistent< S > & As() const
V8_INLINE Source(Local< String > source_string, const ScriptOrigin &origin, CachedData *cached_data=nullptr)
constexpr T * data() const
void set_max_old_generation_size_in_bytes(size_t limit)
static const int kExternalTwoByteRepresentationTag
size_t max_young_generation_size_in_bytes() const
StreamedSource & operator=(const StreamedSource &)=delete
static const int kTrueValueRootIndex
const char ** end() const
void OnBytesReceived(const uint8_t *bytes, size_t size)
static uint32_t CachedDataVersionTag()
V8_WARN_UNUSED_RESULT Maybe< bool > HasOwnProperty(Local< Context > context, Local< Name > key)
static Local< Symbol > For(Isolate *isolate, Local< String > name)
static Local< Uint8ClampedArray > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static const int kJSSpecialApiObjectType
bool IsSharedCrossOrigin() const
StartupData CreateBlob(FunctionCodeHandling function_code_handling)
static V8_INLINE Uint8Array * Cast(Value *obj)
void DateTimeConfigurationChangeNotification(TimeZoneDetection time_zone_detection=TimeZoneDetection::kSkip)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Run(Local< Context > context)
void SetAccessCheckCallbackAndHandler(AccessCheckCallback callback, const NamedPropertyHandlerConfiguration &named_handler, const IndexedPropertyHandlerConfiguration &indexed_handler, Local< Value > data=Local< Value >())
NamedPropertyHandlerConfiguration(GenericNamedPropertyGetterCallback getter, GenericNamedPropertySetterCallback setter, GenericNamedPropertyDescriptorCallback descriptor, GenericNamedPropertyDeleterCallback deleter, GenericNamedPropertyEnumeratorCallback enumerator, GenericNamedPropertyDefinerCallback definer, Local< Value > data=Local< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
CounterLookupCallback counter_lookup_callback
void SetCaptureStackTraceForUncaughtExceptions(bool capture, int frame_limit=10, StackTrace::StackTraceOptions options=StackTrace::kOverview)
V8_WARN_UNUSED_RESULT Maybe< PropertyAttribute > GetRealNamedPropertyAttributes(Local< Context > context, Local< Name > key)
internal::Address * values_
V8_INLINE void Set(double i)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > CallAsConstructor(Local< Context > context, int argc, Local< Value > argv[])
static Isolate * New(const CreateParams ¶ms)
static V8_INLINE TypedArray * Cast(Value *obj)
void(* DcheckErrorCallback)(const char *file, int line, const char *message)
virtual void ThrowDataCloneError(Local< String > message)=0
CachedData(const CachedData &)=delete
Local< String > TypeOf(Isolate *)
uint32_t * stack_limit() const
static constexpr int kMaxLength
V8_WARN_UNUSED_RESULT MaybeLocal< Promise > Catch(Local< Context > context, Local< Function > handler)
V8_INLINE bool operator!=(const PersistentBase< S > &that) const
Local< Context > CreationContext()
void(* CallbackFunction)(Local< Object > holder, int index, StartupData payload, void *data)
void Set(const TracedGlobal< S > &handle)
static const int kNoScriptId
static V8_WARN_UNUSED_RESULT MaybeLocal< String > NewFromTwoByte(Isolate *isolate, const uint16_t *data, NewStringType type=NewStringType::kNormal, int length=-1)
void SetIdle(bool is_idle)
static Local< FunctionTemplate > NewWithCache(Isolate *isolate, FunctionCallback callback, Local< Private > cache_property, Local< Value > data=Local< Value >(), Local< Signature > signature=Local< Signature >(), int length=0, SideEffectType side_effect_type=SideEffectType::kHasSideEffect)
size_t ByteLength() const
TransferrableModule & operator=(const TransferrableModule &src)=delete
void VisitWeakHandles(PersistentHandleVisitor *visitor)
V8_INLINE Local< S > FromMaybe(Local< S > default_value) const
static Local< Value > TypeError(Local< String > message)
void(* FailedAccessCheckCallback)(Local< Object > target, AccessType type, Local< Value > data)
void IncreaseAllocatedSize(size_t bytes)
void * DeleterData() const
static V8_INLINE int InternalFieldCount(const TracedGlobal< Object > &object)
static V8_INLINE int InternalFieldCount(const PersistentBase< Object > &object)
static Local< Value > ReferenceError(Local< String > message)
void operator=(const Value &)=delete
virtual ~EmbedderHeapTracer()=default
int ContextDisposedNotification(bool dependant_context=true)
static const int kReturnValueIndex
void RequestGarbageCollectionForTesting(GarbageCollectionType type)
V8_WARN_UNUSED_RESULT Maybe< bool > Delete(Local< Context > context, Local< Value > key)
void SetModifyCodeGenerationFromStringsCallback(ModifyCodeGenerationFromStringsCallback callback)
V8_WARN_UNUSED_RESULT MaybeLocal< Value > GetRealNamedProperty(Local< Context > context, Local< Name > key)
bool GetHeapObjectStatisticsAtLastGC(HeapObjectStatistics *object_statistics, size_t type_index)
V8_WARN_UNUSED_RESULT Maybe< int > GetStartColumn(Local< Context > context) const
void operator=(const Utf8Value &)=delete
void * external_callback_entry
void SetAllowAtomicsWait(bool allow)
static const int kNullOddballKind
Local< PrimitiveArray > GetHostDefinedOptions()
static int GetCurrentDepth(Isolate *isolate)
virtual ~Delegate()=default
static Local< Value > Error(Local< String > message)
static const int kEmbedderFieldCount
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewInstance(Local< Context > context) const
V8_WARN_UNUSED_RESULT Maybe< int64_t > IntegerValue(Local< Context > context) const
bool only_terminate_in_safe_scope
virtual Maybe< bool > WriteHostObject(Isolate *isolate, Local< Object > object)
V8_INLINE Locker(Isolate *isolate)
static std::unique_ptr< MicrotaskQueue > New(Isolate *isolate, MicrotasksPolicy policy=MicrotasksPolicy::kAuto)
void SetFatalErrorHandler(FatalErrorCallback that)
Local< Value > GetScriptName()
static V8_INLINE Local< String > Empty(Isolate *isolate)
int GetScriptColumnNumber() const
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewInstance(Local< Context > context, int argc, Local< Value > argv[]) const
void(* MicrotaskCallback)(void *data)
V8_INLINE Scope(Local< Context > context)
void(* GenericNamedPropertySetterCallback)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< Value > &info)
static CachedData * CreateCodeCache(Local< UnboundModuleScript > unbound_module_script)
PromiseRejectMessage(Local< Promise > promise, PromiseRejectEvent event, Local< Value > value)
static V8_INLINE Int16Array * Cast(Value *obj)
HeapProfiler * GetHeapProfiler()
IndexedPropertyHandlerConfiguration(IndexedPropertyGetterCallback getter, IndexedPropertySetterCallback setter, IndexedPropertyQueryCallback query, IndexedPropertyDeleterCallback deleter, IndexedPropertyEnumeratorCallback enumerator, IndexedPropertyDefinerCallback definer, IndexedPropertyDescriptorCallback descriptor, Local< Value > data=Local< Value >(), PropertyHandlerFlags flags=PropertyHandlerFlags::kNone)
static V8_WARN_UNUSED_RESULT MaybeLocal< String > NewExternalOneByte(Isolate *isolate, ExternalOneByteStringResource *resource)
void(* OOMErrorCallback)(const char *location, bool is_heap_oom)
V8_INLINE Local< Value > NewTarget() const
#define V8_LIKELY(condition)
HandleScope(const HandleScope &)=delete
bool IsBigUint64Array() const
bool IsUserJavaScript() const
V8_WARN_UNUSED_RESULT MaybeLocal< Object > ToObject(Local< Context > context) const
void operator=(const HandleScope &)=delete
MicrotasksPolicy GetMicrotasksPolicy() const
void operator delete[](void *, size_t)=delete
static const int kDataIndex
ValueDeserializer(Isolate *isolate, const uint8_t *data, size_t size)
Maybe< bool > DeletePrivate(Local< Context > context, Local< Private > key)
static const int kExternalOneByteRepresentationTag
static V8_WARN_UNUSED_RESULT MaybeLocal< Value > Parse(Local< Context > context, Local< String > json_string)
V8_INLINE Global(Isolate *isolate, Local< S > that)
V8_WARN_UNUSED_RESULT MaybeLocal< Promise > Then(Local< Context > context, Local< Function > handler)
size_t total_heap_size_executable()
static const char * GetVersion()
Local< Value > Exception() const
static Local< BigUint64Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
V8_INLINE Local< Promise > GetPromise() const
V8_INLINE T * operator->() const
GenericNamedPropertyGetterCallback getter
V8_INLINE MaybeLocal(Local< S > that)
void SetAccessor(Local< Name > name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter=nullptr, Local< Value > data=Local< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None, Local< AccessorSignature > signature=Local< AccessorSignature >(), SideEffectType getter_side_effect_type=SideEffectType::kHasSideEffect, SideEffectType setter_side_effect_type=SideEffectType::kHasSideEffect)
virtual void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)=0
virtual ~ExternalSourceStream()=default
void(* AccessorSetterCallback)(Local< String > property, Local< Value > value, const PropertyCallbackInfo< void > &info)
void SetDefaultContext(Local< Context > context, SerializeInternalFieldsCallback callback=SerializeInternalFieldsCallback())
static const int kExternalMemoryOffset
static const int kNodeClassIdOffset
void SetAlignedPointerInInternalFields(int argc, int indices[], void *values[])
void operator=(const Global &)=delete
static V8_INLINE Local< T > New(Isolate *isolate, const PersistentBase< T > &that)
V8_INLINE Local< Value > Data() const
V8_WARN_UNUSED_RESULT Maybe< bool > HasOwnProperty(Local< Context > context, uint32_t index)
static V8_INLINE Local< Boolean > New(Isolate *isolate, bool value)
static V8_INLINE BigInt * Cast(v8::Value *obj)
static Local< Int16Array > New(Local< SharedArrayBuffer > shared_array_buffer, size_t byte_offset, size_t length)
static bool InitializeICU(const char *icu_data_file=nullptr)
SuppressMicrotaskExecutionScope(const SuppressMicrotaskExecutionScope &)=delete
static const int kJSObjectType
void SetCallHandler(FunctionCallback callback, Local< Value > data=Local< Value >(), SideEffectType side_effect_type=SideEffectType::kHasSideEffect)
void(* HostCleanupFinalizationGroupCallback)(Local< Context > context, Local< FinalizationGroup > fg)
static V8_INLINE Persistent< T > & Cast(const Persistent< S > &that)
void Set(const Global< S > &handle)
Local< Object > GetExtrasBindingObject()
Utf8Value(Isolate *isolate, Local< v8::Value > obj)
MicrotasksScope & operator=(const MicrotasksScope &)=delete
virtual MaybeLocal< Object > ReadHostObject(Isolate *isolate)
static Local< Symbol > GetToStringTag(Isolate *isolate)
bool IsSharedArrayBuffer() const
V8_WARN_UNUSED_RESULT MaybeLocal< Array > GetOwnPropertyNames(Local< Context > context, PropertyFilter filter, KeyConversionMode key_conversion=KeyConversionMode::kKeepNumbers)
V8_INLINE Local< Integer > ResourceLineOffset() const
void(* HostInitializeImportMetaObjectCallback)(Local< Context > context, Local< Module > module, Local< Object > meta)
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void *data=nullptr)
virtual ~Delegate()=default
virtual bool IsCacheable() const
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, Local< Value > key)
V8_INLINE const ScriptOriginOptions & GetResourceOptions() const
V8_INLINE TracedGlobal(const TracedGlobal< S > &other)
static V8_WARN_UNUSED_RESULT MaybeLocal< Script > Compile(Local< Context > context, StreamedSource *source, Local< String > full_source_string, const ScriptOrigin &origin)
PositionType position_type
V8_INLINE Local< Value > operator[](int i) const