23 #include <type_traits> 53 class ImplementationUtilities;
64 class ObjectOperationDescriptor;
71 class RawOperationDescriptor;
92 template<
class T>
class NonCopyablePersistentTraits;
94 template <
class T,
class M = NonCopyablePersistentTraits<T> >
105 template <
class K,
class V,
class T>
107 template <
class K,
class V,
class T>
110 template<
class T,
class P>
class WeakCallbackObject;
118 class CallHandlerHelper;
124 class DeferredHandles;
127 class ExternalString;
129 class LocalEmbedderHeapTracer;
130 class MicrotaskQueue;
131 struct ScriptStreamingData;
133 class PropertyCallbackArguments;
134 class FunctionCallbackArguments;
136 class ScopedExternalStringLock;
137 class ThreadLocalTop;
141 class StreamingDecoder;
147 class ConsoleCallArguments;
152 #define TYPE_CHECK(T, S) 154 *(static_cast<T* volatile*>(0
)) = static_cast<S*>(0
); 194 : val_(
reinterpret_cast<T*>(*that)) {
231 if (a ==
nullptr)
return b ==
nullptr;
232 if (b ==
nullptr)
return false;
240 if (a ==
nullptr)
return b ==
nullptr;
241 if (b ==
nullptr)
return false;
257 return !operator==(that);
262 return !operator==(that);
271 #ifdef V8_ENABLE_CHECKS 274 if (that.IsEmpty())
return Local<T>();
276 return Local<T>(T::Cast(*that));
286 return Local<S>::Cast(*
this);
305 template<
class F>
friend class Local;
322 template <
class F1,
class F2,
class F3>
336 explicit V8_INLINE Local(T* that) : val_(that) {}
342 #if !defined(V8_IMMINENT_DEPRECATION_WARNINGS) 365 : val_(
reinterpret_cast<T*>(*that)) {
377 out->val_ =
IsEmpty() ?
nullptr :
this->val_;
404 template <
class T>
class Eternal {
409 Set(isolate, handle);
421 static const int kInternalFieldsInWeakCallback = 2;
422 static const int kEmbedderFieldsInWeakCallback = 2;
424 template <
typename T>
430 void* embedder_fields[kEmbedderFieldsInWeakCallback],
432 : isolate_(isolate), parameter_(parameter), callback_(callback) {
433 for (
int i = 0; i < kEmbedderFieldsInWeakCallback; ++i) {
434 embedder_fields_[i] = embedder_fields[i];
454 void* embedder_fields_[kEmbedderFieldsInWeakCallback];
503 return Local<T>::New(isolate, *
this);
510 if (a ==
nullptr)
return b ==
nullptr;
511 if (b ==
nullptr)
return false;
519 if (a ==
nullptr)
return b ==
nullptr;
520 if (b ==
nullptr)
return false;
526 return !operator==(that);
531 return !operator==(that);
541 template <
typename P>
589 template<
class F>
friend class Local;
595 template <
class F1,
class F2,
class F3>
600 explicit V8_INLINE PersistentBase(T* val) : val_(val) {}
614 class NonCopyablePersistentTraits {
618 template<
class S,
class M>
638 template<
class S,
class M>
675 template <
class S,
class M2>
689 template <
class S,
class M2>
697 template <
class S,
class M2>
708 if (M::kResetInDestructor)
this->Reset();
714 #ifdef V8_ENABLE_CHECKS 717 if (!that.IsEmpty()) T::Cast(*that);
731 template<
class F>
friend class Local;
736 V8_INLINE T* operator*()
const {
return this->val_; }
737 template<
class S,
class M2>
806 V8_INLINE T* operator*()
const {
return this->val_; }
817 template <
typename T>
835 template <
typename T>
842 bool IsEmpty()
const {
return val_ ==
nullptr; }
859 if (a ==
nullptr)
return b ==
nullptr;
860 if (b ==
nullptr)
return false;
868 if (a ==
nullptr)
return b ==
nullptr;
869 if (b ==
nullptr)
return false;
875 return !operator==(that);
880 return !operator==(that);
901 enum DestructionMode { kWithDestructor, kWithoutDestructor };
906 TracedReferenceBase() =
default;
909 DestructionMode destruction_mode);
914 template <
typename F>
917 template <
typename F>
919 template <
typename F>
921 template <
typename F>
929 template <
typename T>
952 this->val_ =
this->New(isolate, that.val_, &
this->val_,
962 *
this = std::move(other);
968 template <
typename S>
971 *
this = std::move(other);
985 template <
typename S>
1057 template <
typename T>
1075 this->val_ =
this->New(isolate, that.val_, &
this->val_,
1086 *
this = std::move(other);
1093 template <
typename S>
1096 *
this = std::move(other);
1112 template <
typename S>
1169 V8_DEPRECATED(
"Use TracedGlobal<> if callbacks are required.")
1200 return reinterpret_cast<
Isolate*>(isolate_);
1217 void* operator
new(size_t size);
1218 void* operator
new[](size_t size);
1219 void operator
delete(
void*, size_t);
1220 void operator
delete[](
void*, size_t);
1253 return Local<T>(
reinterpret_cast<T*>(slot));
1258 return Escape(value.FromMaybe(
Local<T>()));
1267 void* operator
new(size_t size);
1268 void* operator
new[](size_t size);
1269 void operator
delete(
void*, size_t);
1270 void operator
delete[](
void*, size_t);
1292 void* operator
new(size_t size);
1293 void* operator
new[](size_t size);
1294 void operator
delete(
void*, size_t);
1295 void operator
delete[](
void*, size_t);
1299 int prev_sealed_level_;
1356 bool is_opaque =
false,
bool is_wasm =
false,
1357 bool is_module =
false)
1358 : flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
1359 (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0) |
1360 (is_module ? kIsModule : 0)) {}
1363 (kIsSharedCrossOrigin | kIsOpaque | kIsWasm | kIsModule)) {}
1366 return (flags_ & kIsSharedCrossOrigin) != 0;
1368 bool IsOpaque()
const {
return (flags_ & kIsOpaque) != 0; }
1369 bool IsWasm()
const {
return (flags_ & kIsWasm) != 0; }
1370 bool IsModule()
const {
return (flags_ & kIsModule) != 0; }
1376 kIsSharedCrossOrigin = 1,
1466 : line_number_(line_number), column_number_(column_number) {}
1597 "Use the preceding SetSyntheticModuleExport with an Isolate parameter, " 1598 "instead of the one that follows. The former will throw a runtime " 1599 "error if called for an export that doesn't exist (as per spec); " 1600 "the latter will crash with a failed CHECK().")
1601 void SetSyntheticModuleExport(
Local<
String> export_name,
1746 virtual size_t
GetMoreData(
const uint8_t** src) = 0;
1777 "This class takes ownership of source_stream, so use the constructor " 1778 "taking a unique_ptr to make these semantics clearer")
1791 std::unique_ptr<
internal::ScriptStreamingData> impl_;
1805 explicit ScriptStreamingTask(
internal::ScriptStreamingData* data)
1808 internal::ScriptStreamingData* data_;
1942 Local<
String> arguments[], size_t context_extension_count,
2326 size_t* actual_size);
2392 PrivateData* private_;
2417 Isolate* isolate, uint32_t transfer_id);
2424 Isolate* isolate, uint32_t clone_id);
2471 "Wasm module serialization is only supported via explicit methods, e.g. " 2472 "CompiledWasmModule::Serialize()")
2473 void SetExpectInlineWasm(
bool allow_inline_wasm) {}
2497 PrivateData* private_;
2909 V8_INLINE bool QuickIsUndefined()
const;
2911 V8_INLINE bool QuickIsNullOrUndefined()
const;
2913 bool FullIsUndefined()
const;
2914 bool FullIsNull()
const;
2915 bool FullIsString()
const;
2936 static void CheckCast(
v8::
Value* obj);
2957 static void CheckCast(
Value* obj);
3057 int Write(
Isolate* isolate, uint16_t* buffer,
int start = 0,
int length = -1,
3061 int length = -1,
int options =
NO_OPTIONS)
const;
3064 int* nchars_ref =
nullptr,
int options =
NO_OPTIONS)
const;
3149 virtual const uint16_t*
data()
const = 0;
3154 virtual size_t
length()
const = 0;
3179 virtual const char*
data()
const = 0;
3181 virtual size_t
length()
const = 0;
3211 Isolate* isolate,
const char* data,
3217 Isolate* isolate,
const uint8_t* data,
3223 Isolate* isolate,
const uint16_t* data,
3342 static void CheckCast(
v8::
Value* obj);
3399 static void CheckCast(
Value* obj);
3437 static void CheckCast(
Data* that);
3446 double Value()
const;
3451 static void CheckCast(
v8::
Value* obj);
3462 int64_t
Value()
const;
3466 static void CheckCast(
v8::
Value* obj);
3475 int32_t
Value()
const;
3480 static void CheckCast(
v8::
Value* obj);
3489 uint32_t
Value()
const;
3494 static void CheckCast(
v8::
Value* obj);
3512 int word_count,
const uint64_t* words);
3520 uint64_t
Uint64Value(
bool* lossless =
nullptr)
const;
3527 int64_t
Int64Value(
bool* lossless =
nullptr)
const;
3543 void ToWordsArray(
int* sign_bit,
int* word_count, uint64_t* words)
const;
3549 static void CheckCast(
v8::
Value* obj);
4102 static void CheckCast(
Value* obj);
4103 Local<
Value> SlowGetInternalField(
int index);
4104 void* SlowGetAlignedPointerFromInternalField(
int index);
4130 static void CheckCast(
Value* obj);
4139 size_t
Size()
const;
4166 static void CheckCast(
Value* obj);
4175 size_t
Size()
const;
4198 static void CheckCast(
Value* obj);
4202 template<
typename T>
4206 : value_(that.value_) {
4210 template <
typename S>
4212 template <
typename S>
4214 template <
typename S>
4229 template <
typename S>
4241 template <
class F,
class G,
class H>
4256 template<
typename T>
4295 friend class debug::ConsoleCallArguments;
4315 template<
typename T>
4407 friend class MacroAssembler;
4514 static void CheckCast(
Value* obj);
4517 #ifndef V8_PROMISE_INTERNAL_FIELD_COUNT 4519 #define V8_PROMISE_INTERNAL_FIELD_COUNT 0
4560 static void CheckCast(
Value* obj);
4607 static void CheckCast(
Value* obj);
4680 PrivateData* private_;
4705 static void CheckCast(
Value* obj);
4718 template <
typename T>
4724 constexpr MemorySpan(T* data, size_t size) : data_(data), size_(size) {}
4727 constexpr T*
data()
const {
return data_; }
4729 constexpr size_t
size()
const {
return size_; }
4763 explicit CompiledWasmModule(std::shared_ptr<
internal::
wasm::NativeModule>);
4766 const std::shared_ptr<
internal::
wasm::NativeModule> native_module_;
4792 "Use WasmStreaming for deserialization from cache or the " 4793 "CompiledWasmModule to transfer between isolates")
4805 const uint8_t* start,
4808 static void CheckCast(
Value* obj);
4819 class WasmStreamingImpl;
4826 virtual ~
Client() =
default;
4834 explicit WasmStreaming(std::unique_ptr<WasmStreamingImpl> impl);
4877 void SetUrl(
const char* url, size_t length);
4884 static std::shared_ptr<WasmStreaming>
Unpack(
Isolate* isolate,
4888 std::unique_ptr<WasmStreamingImpl> impl_;
4912 WasmModuleObjectBuilderStreaming(
const WasmModuleObjectBuilderStreaming&) =
4914 WasmModuleObjectBuilderStreaming(WasmModuleObjectBuilderStreaming&&) =
4916 WasmModuleObjectBuilderStreaming& operator=(
4917 const WasmModuleObjectBuilderStreaming&) =
delete;
4918 WasmModuleObjectBuilderStreaming& operator=(
4919 WasmModuleObjectBuilderStreaming&&) =
default;
4930 Persistent<Promise, CopyablePersistentTraits<Promise>> promise_;
4934 std::shared_ptr<
internal::
wasm::StreamingDecoder> streaming_decoder_;
4937 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 4939 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
4993 using BackingStoreDeleterCallback =
void (*)(
void* data, size_t length,
4994 void* deleter_data);
5024 virtual void*
Allocate(size_t length) = 0;
5036 virtual void Free(
void* data, size_t length) = 0;
5065 using DeleterCallback =
void (*)(
void* buffer, size_t length,
void* info);
5070 allocation_base_(
nullptr),
5071 allocation_length_(0),
5074 deleter_data_(
nullptr) {}
5079 return allocation_mode_;
5082 void*
Data()
const {
return data_; }
5084 DeleterCallback
Deleter()
const {
return deleter_; }
5088 Contents(
void* data, size_t byte_length,
void* allocation_base,
5089 size_t allocation_length,
5091 void* deleter_data);
5094 size_t byte_length_;
5095 void* allocation_base_;
5096 size_t allocation_length_;
5098 DeleterCallback deleter_;
5099 void* deleter_data_;
5128 "Use the version that takes a BackingStore. " 5129 "See http://crbug.com/v8/9908.")
5159 size_t byte_length);
5169 void* data, size_t byte_length, BackingStoreDeleterCallback deleter,
5170 void* deleter_data);
5177 "With v8::BackingStore externalized ArrayBuffers are " 5178 "the same as ordinary ArrayBuffers. See http://crbug.com/v8/9908.")
5179 bool IsExternal()
const;
5205 "Use GetBackingStore or Detach. See http://crbug.com/v8/9908.")
5246 static void CheckCast(
Value* obj);
5247 Contents GetContents(
bool externalize);
5251 #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 5253 #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2
5302 static void CheckCast(
Value* obj);
5329 static void CheckCast(
Value* obj);
5339 size_t byte_offset, size_t length);
5341 size_t byte_offset, size_t length);
5346 static void CheckCast(
Value* obj);
5356 size_t byte_offset, size_t length);
5363 Uint8ClampedArray();
5364 static void CheckCast(
Value* obj);
5373 size_t byte_offset, size_t length);
5375 size_t byte_offset, size_t length);
5380 static void CheckCast(
Value* obj);
5390 size_t byte_offset, size_t length);
5392 size_t byte_offset, size_t length);
5397 static void CheckCast(
Value* obj);
5407 size_t byte_offset, size_t length);
5409 size_t byte_offset, size_t length);
5414 static void CheckCast(
Value* obj);
5424 size_t byte_offset, size_t length);
5426 size_t byte_offset, size_t length);
5431 static void CheckCast(
Value* obj);
5441 size_t byte_offset, size_t length);
5443 size_t byte_offset, size_t length);
5448 static void CheckCast(
Value* obj);
5458 size_t byte_offset, size_t length);
5460 size_t byte_offset, size_t length);
5465 static void CheckCast(
Value* obj);
5475 size_t byte_offset, size_t length);
5477 size_t byte_offset, size_t length);
5482 static void CheckCast(
Value* obj);
5491 size_t byte_offset, size_t length);
5493 size_t byte_offset, size_t length);
5498 static void CheckCast(
Value* obj);
5507 size_t byte_offset, size_t length);
5509 size_t byte_offset, size_t length);
5514 static void CheckCast(
Value* obj);
5523 size_t byte_offset, size_t length);
5525 size_t byte_offset, size_t length);
5530 static void CheckCast(
Value* obj);
5551 using DeleterCallback =
void (*)(
void* buffer, size_t length,
void* info);
5556 allocation_base_(
nullptr),
5557 allocation_length_(0),
5560 deleter_data_(
nullptr) {}
5565 return allocation_mode_;
5568 void*
Data()
const {
return data_; }
5570 DeleterCallback
Deleter()
const {
return deleter_; }
5574 Contents(
void* data, size_t byte_length,
void* allocation_base,
5575 size_t allocation_length,
5576 Allocator::
AllocationMode allocation_mode, DeleterCallback deleter,
5577 void* deleter_data);
5580 size_t byte_length_;
5581 void* allocation_base_;
5582 size_t allocation_length_;
5584 DeleterCallback deleter_;
5585 void* deleter_data_;
5610 "Use the version that takes a BackingStore. " 5611 "See http://crbug.com/v8/9908.")
5641 size_t byte_length);
5651 void* data, size_t byte_length, BackingStoreDeleterCallback deleter,
5652 void* deleter_data);
5659 "Use the version that takes a BackingStore. " 5660 "See http://crbug.com/v8/9908.")
5670 "With v8::BackingStore externalized SharedArrayBuffers are the same " 5671 "as ordinary SharedArrayBuffers. See http://crbug.com/v8/9908.")
5672 bool IsExternal()
const;
5687 "Use GetBackingStore or Detach. See http://crbug.com/v8/9908.")
5730 SharedArrayBuffer();
5731 static void CheckCast(
Value* obj);
5732 Contents GetContents(
bool externalize);
5753 static void CheckCast(
Value* obj);
5769 static void CheckCast(
Value* obj);
5784 static void CheckCast(
Value* obj);
5799 static void CheckCast(
Value* obj);
5815 static void CheckCast(
Value* obj);
5831 static void CheckCast(
Value* obj);
5877 uint32_t backtrack_limit);
5907 static void CheckCast(
Value* obj);
5945 void*
Value()
const;
5947 static void CheckCast(
v8::
Value* obj);
5950 #define V8_INTRINSICS_LIST(F) 5951 F(ArrayProto_entries, array_entries_iterator) 5952 F(ArrayProto_forEach, array_for_each_iterator) 5953 F(ArrayProto_keys, array_keys_iterator) 5954 F(ArrayProto_values, array_values_iterator) 5955 F(ErrorPrototype, initial_error_prototype) 5956 F(IteratorPrototype, initial_iterator_prototype) 5959 #define V8_DECL_INTRINSIC(name, iname) k##name, 5961 #undef V8_DECL_INTRINSIC 6413 V8_DEPRECATED(
"Use v8::Isolate::GetDataFromSnapshotOnce instead")
6512 static void CheckCast(
Data* that);
6705 V8_DEPRECATED(
"Use v8::Isolate::GetDataFromSnapshotOnce instead")
6796 deleter
, enumerator
, data
));
6882 static void CheckCast(
Data* that);
6905 static void CheckCast(
Data* that);
6922 AccessorSignature();
6924 static void CheckCast(
Data* that);
6937 Extension(
const char* name,
const char* source =
nullptr,
int dep_count = 0,
6938 const char** deps =
nullptr,
int source_length = -1);
6945 const char*
name()
const {
return name_; }
6961 size_t source_length_;
7012 size_t maximum_heap_size_in_bytes);
7024 uint64_t virtual_memory_limit);
7047 return max_old_generation_size_;
7050 max_old_generation_size_ = limit;
7059 return max_young_generation_size_;
7062 max_young_generation_size_ = limit;
7066 return initial_old_generation_size_;
7069 initial_old_generation_size_ = initial_size;
7073 return initial_young_generation_size_;
7076 initial_young_generation_size_ = initial_size;
7086 code_range_size_ = limit_in_mb * kMB;
7096 max_old_generation_size_ = limit_in_mb * kMB;
7104 static constexpr size_t kMB = 1048576u;
7105 size_t code_range_size_ = 0;
7106 size_t max_old_generation_size_ = 0;
7107 size_t max_young_generation_size_ = 0;
7108 size_t max_zone_pool_size_ = 0;
7109 size_t initial_old_generation_size_ = 0;
7110 size_t initial_young_generation_size_ = 0;
7111 uint32_t* stack_limit_ =
nullptr;
7123 const char* message);
7280 : promise_(promise), event_(event), value_(value) {}
7346 void* data =
nullptr) = 0;
7390 MicrotaskQueue() =
default;
7431 internal::MicrotaskQueue*
const microtask_queue_;
7540 typedef size_t (*NearHeapLimitCallback)(
void* data, size_t current_heap_limit,
7541 size_t initial_heap_limit);
7555 return read_only_space_physical_size_;
7559 size_t read_only_space_size_;
7560 size_t read_only_space_used_size_;
7561 size_t read_only_space_physical_size_;
7594 size_t total_heap_size_;
7595 size_t total_heap_size_executable_;
7596 size_t total_physical_size_;
7597 size_t total_available_size_;
7598 size_t used_heap_size_;
7599 size_t heap_size_limit_;
7600 size_t malloced_memory_;
7601 size_t external_memory_;
7602 size_t peak_malloced_memory_;
7603 bool does_zap_garbage_;
7604 size_t number_of_native_contexts_;
7605 size_t number_of_detached_contexts_;
7622 const char* space_name_;
7624 size_t space_used_size_;
7625 size_t space_available_size_;
7626 size_t physical_space_size_;
7641 const char* object_type_;
7642 const char* object_sub_type_;
7643 size_t object_count_;
7644 size_t object_size_;
7657 size_t code_and_metadata_size_;
7658 size_t bytecode_and_metadata_size_;
7659 size_t external_script_source_size_;
7747 void* new_code_start;
7795 #if defined(V8_OS_WIN) 7817 uint16_t class_id) {}
7905 const std::vector<std::pair<
void*,
void*> >& embedder_fields) = 0;
8031 void* data_arg =
nullptr)
8048 void* data_arg =
nullptr)
8098 context_sizes_in_bytes,
8099 size_t unattributed_size_in_bytes) = 0;
8265 void* internal_throws_;
8266 void* internal_assert_;
8267 void* internal_dump_;
8288 internal::MicrotaskQueue*
const microtask_queue_;
8680 size_t frames_limit,
SampleInfo* sample_info);
8855 size_t offset_in_bytes, int64_t value,
8856 double timeout_in_ms,
8887 void* data =
nullptr);
8890 typedef size_t (*GetExternallyAllocatedMemoryInBytesCallback)();
8899 GetExternallyAllocatedMemoryInBytesCallback callback);
9215 void GetCodeRange(
void** start, size_t* length_in_bytes);
9282 "Use Isolate::SetModifyCodeGenerationFromStringsCallback instead. " 9283 "See http://crbug.com/v8/10096.")
9284 void SetAllowCodeGenerationFromStringsCallback(
9287 ModifyCodeGenerationFromStringsCallback callback);
9355 bool capture,
int frame_limit = 10,
9436 void*
operator new(size_t size) =
delete;
9437 void*
operator new[](size_t size) =
delete;
9438 void operator delete(
void*, size_t) =
delete;
9439 void operator delete[](
void*, size_t) =
delete;
9442 template <
class K,
class V,
class Traits>
9446 void ReportExternalAllocationLimitReached();
9447 void CheckMemoryPressure();
9483 typedef uintptr_t (*ReturnAddressLocationResolver)(
9484 uintptr_t return_addr_location);
9546 ReturnAddressLocationResolver return_address_resolver);
9566 static bool InitializeICU(
const char* icu_data_file =
nullptr);
9581 const char* icu_data_file =
nullptr);
9634 static bool TryHandleSignal(
int signal_number,
void* info,
void* context);
9645 #if defined(V8_OS_WIN) 9672 bool has_destructor);
9677 static void CopyTracedGlobalReference(
const internal::
Address*
const* from,
9687 static void SetFinalizationCallbackTraced(
9694 template <
class K,
class V,
class T>
9697 static void FromJustIsNothing();
9698 static void ToLocalEmpty();
9699 static void InternalFieldOutOfBounds(
int index);
9737 const intptr_t* external_references =
nullptr,
9879 return has_value_ ? value_ : default_value;
9883 return (
IsJust() == other.IsJust()) &&
9892 Maybe() : has_value_(
false) {}
9893 explicit Maybe(
const T& t) : has_value_(
true), value_(t) {}
9932 Maybe() : is_valid_(
false) {}
9933 explicit Maybe(JustTag) : is_valid_(
true) {}
10077 if (handler ==
nullptr)
return nullptr;
10078 return handler->js_stack_comparable_address_;
10087 void* operator
new(size_t size);
10088 void* operator
new[](size_t size);
10089 void operator
delete(
void*, size_t);
10090 void operator
delete[](
void*, size_t);
10092 void ResetInternal();
10097 void* message_obj_;
10098 void* js_stack_comparable_address_;
10099 bool is_verbose_ : 1;
10100 bool can_continue_ : 1;
10101 bool capture_message_ : 1;
10103 bool has_terminated_ : 1;
10119 : name_count_(name_count), names_(names) { }
10121 const char**
begin()
const {
return &names_[0]; }
10122 const char**
end()
const {
return &names_[name_count_]; }
10125 const int name_count_;
10126 const char** names_;
10200 Isolate* isolate, size_t context_snapshot_index,
10384 return js_stack_comparable_address_;
10391 uintptr_t js_stack_comparable_address_ = 0;
10392 const BackupIncumbentScope* prev_ =
nullptr;
10402 Local<
Value> SlowGetEmbedderData(
int index);
10403 void* SlowGetAlignedPointerFromEmbedderData(
int index);
10492 void Initialize(
Isolate* isolate);
10523 void Initialize(
Isolate* isolate);
10569 const void* stack_base);
10580 size_t code_pages_length,
10583 const void* stack_base);
10609 return New(isolate, that.val_);
10614 return New(isolate, that.val_);
10619 return New(isolate, that.val_);
10624 if (that ==
nullptr)
return Local<T>();
10625 T* that_ptr = that;
10628 reinterpret_cast<
internal::Isolate*>(isolate)
, *p
)));
10636 val_ =
reinterpret_cast<T*>(
10637 V8::Eternalize(isolate,
reinterpret_cast<
Value*>(*handle)));
10644 return Local<T>(val_);
10651 return Local<T>(val_);
10657 #ifdef V8_ENABLE_CHECKS 10658 if (index < 0 || index >= kEmbedderFieldsInWeakCallback) {
10659 V8::InternalFieldOutOfBounds(index);
10662 return embedder_fields_[index];
10668 if (that ==
nullptr)
return nullptr;
10670 return reinterpret_cast<T*>(
10671 V8::GlobalizeReference(
reinterpret_cast<
internal::Isolate*>(isolate),
10676 template <
class T,
class M>
10677 template <
class S,
class M2>
10681 if (that.IsEmpty())
return;
10683 this->val_ =
reinterpret_cast<T*>(
V8::CopyGlobalReference(p));
10684 M::Copy(that,
this);
10690 if (
this->IsEmpty())
return false;
10698 if (
this->IsEmpty())
return;
10709 if (other.IsEmpty())
return;
10710 this->val_ = New(isolate, other.val_);
10720 if (other.IsEmpty())
return;
10721 this->val_ = New(isolate, other.val_);
10726 template <
typename P>
10732 reinterpret_cast<Callback>(callback), type);
10741 template <
typename P>
10743 return reinterpret_cast<P*>(
10756 if (
this->IsEmpty())
return;
10759 *
reinterpret_cast<uint16_t*>(addr) = class_id;
10766 if (
this->IsEmpty())
return 0;
10769 return *
reinterpret_cast<uint16_t*>(addr);
10774 if (other.val_ !=
nullptr) {
10777 other.val_ =
nullptr;
10785 if (
this != &rhs) {
10787 if (rhs.val_ !=
nullptr) {
10788 this->val_ = rhs.val_;
10789 V8::MoveGlobalReference(
10792 rhs.val_ =
nullptr;
10800 DestructionMode destruction_mode) {
10801 if (that ==
nullptr)
return nullptr;
10803 return reinterpret_cast<T*>(
V8::GlobalizeTracedReference(
10804 reinterpret_cast<
internal::Isolate*>(isolate), p,
10806 destruction_mode == kWithDestructor));
10821 if (other.IsEmpty())
return;
10822 this->val_ =
this->New(isolate, other.val_, &
this->val_,
10830 *
this = std::move(rhs.
template As<T>());
10838 *
this = rhs.
template As<T>();
10844 if (
this != &rhs) {
10845 V8::MoveTracedGlobalReference(
10854 if (
this != &rhs) {
10856 if (rhs.val_ !=
nullptr) {
10857 V8::CopyTracedGlobalReference(
10870 if (other.IsEmpty())
return;
10871 this->val_ =
this->New(isolate, other.val_, &
this->val_,
10879 *
this = std::move(rhs.
template As<T>());
10888 *
this = rhs.
template As<T>();
10894 if (
this != &rhs) {
10895 V8::MoveTracedGlobalReference(
10904 if (
this != &rhs) {
10906 if (rhs.val_ !=
nullptr) {
10907 V8::CopyTracedGlobalReference(
10921 *
reinterpret_cast<uint16_t*>(addr) = class_id;
10930 return *
reinterpret_cast<uint16_t*>(addr);
10936 V8::SetFinalizationCallbackTraced(
10937 reinterpret_cast<
internal::
Address*>(
this->val_), parameter, callback);
10943 V8::SetFinalizationCallbackTraced(
10944 reinterpret_cast<
internal::
Address*>(
this->val_), parameter, callback);
10947 template <
typename T>
10950 template <
typename T>
10951 template <
typename S>
10955 *value_ = GetDefaultValue();
10961 template <
typename T>
10962 template <
typename S>
10966 *value_ = GetDefaultValue();
10972 template <
typename T>
10973 template <
typename S>
10977 *value_ = GetDefaultValue();
10983 template<
typename T>
10989 template<
typename T>
11000 template<
typename T>
11004 bool fits_into_int32_t = (i & (1U << 31)) == 0;
11006 Set(
static_cast<int32_t>(i));
11012 template<
typename T>
11025 template<
typename T>
11032 template<
typename T>
11039 template<
typename T>
11046 template <
typename T>
11049 return *
reinterpret_cast<
Isolate**>(&value_[-2]);
11052 template <
typename T>
11060 template <
typename T>
11061 template <
typename S>
11067 template <
typename T>
11073 template <
typename T>
11079 template<
typename T>
11086 template<
typename T>
11092 template<
typename T>
11098 template <
typename T>
11104 template <
typename T>
11110 template<
typename T>
11116 template<
typename T>
11122 template<
typename T>
11128 template<
typename T>
11142 : resource_name_(resource_name),
11143 resource_line_offset_(resource_line_offset),
11144 resource_column_offset_(resource_column_offset),
11145 options_
(!resource_is_shared_cross_origin
.IsEmpty() &&
11150 script_id_(script_id),
11151 source_map_url_(source_map_url),
11152 host_defined_options_(host_defined_options) {}
11157 return host_defined_options_;
11161 return resource_line_offset_;
11166 return resource_column_offset_;
11177 : source_string(string),
11184 cached_data(data) {}
11188 : source_string(string), cached_data(data) {}
11192 delete cached_data;
11198 return cached_data;
11202 return resource_options;
11216 #ifdef V8_ENABLE_CHECKS 11223 #ifdef V8_ENABLE_CHECKS 11230 #ifdef V8_ENABLE_CHECKS 11233 return reinterpret_cast<
Signature*>(data);
11237 #ifdef V8_ENABLE_CHECKS 11244 #ifndef V8_ENABLE_CHECKS 11247 A obj = *
reinterpret_cast<A*>(
this);
11256 #ifdef V8_COMPRESS_POINTERS 11259 value = I::DecompressTaggedAnyField(obj,
static_cast<int32_t>(value));
11267 return SlowGetInternalField(index);
11272 #ifndef V8_ENABLE_CHECKS 11275 A obj = *
reinterpret_cast<A*>(
this);
11286 return SlowGetAlignedPointerFromInternalField(index);
11290 #ifdef V8_ENABLE_CHECKS 11293 return static_cast<
String*>(value);
11309 A obj = *
reinterpret_cast<
const A*>(
this);
11316 result = GetExternalStringResourceSlow();
11318 #ifdef V8_ENABLE_CHECKS 11319 VerifyExternalStringResource(result);
11329 A obj = *
reinterpret_cast<
const A*>(
this);
11338 resource = GetExternalStringResourceBaseSlow(encoding_out);
11340 #ifdef V8_ENABLE_CHECKS 11341 VerifyExternalStringResourceBase(resource, *encoding_out);
11348 #ifdef V8_ENABLE_CHECKS 11349 return FullIsUndefined();
11351 return QuickIsUndefined();
11355 bool Value::QuickIsUndefined()
const {
11358 A obj = *
reinterpret_cast<
const A*>(
this);
11366 #ifdef V8_ENABLE_CHECKS 11367 return FullIsNull();
11369 return QuickIsNull();
11373 bool Value::QuickIsNull()
const {
11376 A obj = *
reinterpret_cast<
const A*>(
this);
11383 #ifdef V8_ENABLE_CHECKS 11384 return FullIsNull() || FullIsUndefined();
11386 return QuickIsNullOrUndefined();
11390 bool Value::QuickIsNullOrUndefined()
const {
11393 A obj = *
reinterpret_cast<
const A*>(
this);
11401 #ifdef V8_ENABLE_CHECKS 11402 return FullIsString();
11404 return QuickIsString();
11408 bool Value::QuickIsString()
const {
11411 A obj = *
reinterpret_cast<
const A*>(
this);
11418 return static_cast<
Value*>(value);
11423 #ifdef V8_ENABLE_CHECKS 11426 return static_cast<
Boolean*>(value);
11431 #ifdef V8_ENABLE_CHECKS 11434 return static_cast<
Name*>(value);
11439 #ifdef V8_ENABLE_CHECKS 11442 return static_cast<
Symbol*>(value);
11447 #ifdef V8_ENABLE_CHECKS 11450 return reinterpret_cast<
Private*>(data);
11455 #ifdef V8_ENABLE_CHECKS 11458 return static_cast<
Number*>(value);
11463 #ifdef V8_ENABLE_CHECKS 11466 return static_cast<
Integer*>(value);
11471 #ifdef V8_ENABLE_CHECKS 11474 return static_cast<
Int32*>(value);
11479 #ifdef V8_ENABLE_CHECKS 11482 return static_cast<
Uint32*>(value);
11486 #ifdef V8_ENABLE_CHECKS 11489 return static_cast<
BigInt*>(value);
11493 #ifdef V8_ENABLE_CHECKS 11496 return static_cast<
Date*>(value);
11501 #ifdef V8_ENABLE_CHECKS 11509 #ifdef V8_ENABLE_CHECKS 11517 #ifdef V8_ENABLE_CHECKS 11524 #ifdef V8_ENABLE_CHECKS 11531 #ifdef V8_ENABLE_CHECKS 11539 #ifdef V8_ENABLE_CHECKS 11542 return static_cast<
RegExp*>(value);
11547 #ifdef V8_ENABLE_CHECKS 11550 return static_cast<
Object*>(value);
11555 #ifdef V8_ENABLE_CHECKS 11558 return static_cast<
Array*>(value);
11563 #ifdef V8_ENABLE_CHECKS 11566 return static_cast<
Map*>(value);
11571 #ifdef V8_ENABLE_CHECKS 11574 return static_cast<
Set*>(value);
11579 #ifdef V8_ENABLE_CHECKS 11582 return static_cast<
Promise*>(value);
11587 #ifdef V8_ENABLE_CHECKS 11590 return static_cast<
Proxy*>(value);
11594 #ifdef V8_ENABLE_CHECKS 11601 #ifdef V8_ENABLE_CHECKS 11609 #ifdef V8_ENABLE_CHECKS 11617 #ifdef V8_ENABLE_CHECKS 11625 #ifdef V8_ENABLE_CHECKS 11633 #ifdef V8_ENABLE_CHECKS 11641 #ifdef V8_ENABLE_CHECKS 11649 #ifdef V8_ENABLE_CHECKS 11657 #ifdef V8_ENABLE_CHECKS 11665 #ifdef V8_ENABLE_CHECKS 11673 #ifdef V8_ENABLE_CHECKS 11681 #ifdef V8_ENABLE_CHECKS 11689 #ifdef V8_ENABLE_CHECKS 11696 #ifdef V8_ENABLE_CHECKS 11703 #ifdef V8_ENABLE_CHECKS 11710 #ifdef V8_ENABLE_CHECKS 11718 #ifdef V8_ENABLE_CHECKS 11721 return static_cast<
DataView*>(value);
11726 #ifdef V8_ENABLE_CHECKS 11734 #ifdef V8_ENABLE_CHECKS 11737 return static_cast<
Function*>(value);
11742 #ifdef V8_ENABLE_CHECKS 11745 return static_cast<
External*>(value);
11749 template<
typename T>
11755 template<
typename T>
11761 template<
typename T>
11767 template<
typename T>
11773 template<
typename T>
11778 template <
typename T>
11844 T* data =
reinterpret_cast<T*>(GetDataFromSnapshotOnce(index));
11845 if (data)
internal::PerformCastCheck(data);
11846 return Local<T>(data);
11850 int64_t change_in_bytes) {
11852 constexpr int64_t kMemoryReducerActivationLimit = 32 * 1024 * 1024;
11853 int64_t* external_memory =
reinterpret_cast<int64_t*>(
11855 int64_t* external_memory_limit =
reinterpret_cast<int64_t*>(
11857 int64_t* external_memory_at_last_mc =
11858 reinterpret_cast<int64_t*>(
reinterpret_cast<uint8_t*>(
this) +
11863 const int64_t amount =
11864 static_cast<int64_t>(
static_cast<uint64_t>(change_in_bytes) +
11865 static_cast<uint64_t>(*external_memory));
11866 *external_memory = amount;
11868 int64_t allocation_diff_since_last_mc =
11869 static_cast<int64_t>(
static_cast<uint64_t>(*external_memory) -
11870 static_cast<uint64_t>(*external_memory_at_last_mc));
11873 if (allocation_diff_since_last_mc > kMemoryReducerActivationLimit) {
11874 CheckMemoryPressure();
11877 if (change_in_bytes < 0) {
11878 const int64_t lower_limit =
11879 static_cast<int64_t>(
static_cast<uint64_t>(*external_memory_limit) +
11880 static_cast<uint64_t>(change_in_bytes));
11882 *external_memory_limit = lower_limit;
11884 }
else if (change_in_bytes > 0 && amount > *external_memory_limit) {
11885 ReportExternalAllocationLimitReached();
11887 return *external_memory;
11891 #ifndef V8_ENABLE_CHECKS 11894 A ctx = *
reinterpret_cast<
const A*>(
this);
11900 #ifdef V8_COMPRESS_POINTERS 11904 I::DecompressTaggedAnyField(embedder_data,
static_cast<int32_t>(value));
11907 *
reinterpret_cast<A*>(
this)
);
11911 return SlowGetEmbedderData(index);
11917 #ifndef V8_ENABLE_CHECKS 11920 A ctx = *
reinterpret_cast<
const A*>(
this);
11927 return SlowGetAlignedPointerFromEmbedderData(index);
11933 T* data =
reinterpret_cast<T*>(GetDataFromSnapshotOnce(index));
11934 if (data)
internal::PerformCastCheck(data);
11935 return Local<T>(data);
11940 T* object_ptr = *object;
11942 return AddData(context, *p);
11947 T* object_ptr = *object;
11949 return AddData(*p);
GenericNamedPropertyDefinerCallback definer
bool CanBeRehashed() const
bool IsConstructor() const
Scope(const Scope &)=delete
Local< StackTrace > GetStackTrace() const
static const int kJSApiObjectType
V8_INLINE TracedReference(const TracedReference &other)
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()
TracedReference< T > & operator=(TracedReference< S > &&rhs)
V8_INLINE Local< Value > GetEmbedderData(int index)
V8_INLINE void Set(Isolate *isolate, const char *name, Local< Data > value)
Local< Value > GetSourceMappingURL()
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
V8_WARN_UNUSED_RESULT Maybe< bool > SetSyntheticModuleExport(Isolate *isolate, Local< String > export_name, Local< Value > export_value)
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 read_only_space_physical_size()
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)
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)
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback)
JSEntryStub js_entry_stub
~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 set_code_range_size(size_t limit_in_mb)
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
Local< Value > export_value
bool SetCompiledModuleBytes(const uint8_t *bytes, size_t size)
static V8_INLINE int GetOddballKind(const internal::Address obj)
friend class TracedReference
size_t read_only_space_size()
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
size_t code_range_size() 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
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)
void(* MicrotasksCompletedCallback)(Isolate *)
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)
V8_WARN_UNUSED_RESULT Maybe< int > GetEndColumn(Local< Context > context) const
virtual bool IsTracingDone()=0
void SetCallAsFunctionHandler(FunctionCallback callback, Local< Value > data=Local< Value >())
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
virtual void ResetHandleInNonTracingGC(const v8::TracedReference< v8::Value > &handle)
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)
void Set(const TracedReferenceBase< S > &handle)
static Local< Signature > New(Isolate *isolate, Local< FunctionTemplate > receiver=Local< FunctionTemplate >())
bool MeasureMemory(std::unique_ptr< MeasureMemoryDelegate > delegate, MeasureMemoryExecution execution=MeasureMemoryExecution::kDefault)
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
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
static std::unique_ptr< BackingStore > NewBackingStore(Isolate *isolate, size_t byte_length)
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
WasmModuleObject()=delete
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)
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 >())
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)
void Externalize(const std::shared_ptr< BackingStore > &backing_store)
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)
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback)
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 >())
JSEntryStubs GetJSEntryStubs()
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)
virtual void MeasurementComplete(const std::vector< std::pair< Local< Context >, size_t >> &context_sizes_in_bytes, size_t unattributed_size_in_bytes)=0
TryCatch(const TryCatch &)=delete
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)
static V8_INLINE int InternalFieldCount(const TracedReferenceBase< Object > &object)
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)
V8_INLINE uint16_t WrapperClassId() const
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 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)
void SetStackStart(void *stack_start)
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)
size_t max_old_space_size() const
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)
size_t ByteLength() const
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)
V8_INLINE Local< PrimitiveArray > HostDefinedOptions() const
static V8_WARN_UNUSED_RESULT MaybeLocal< RegExp > NewWithBacktrackLimit(Local< Context > context, Local< String > pattern, Flags flags, uint32_t backtrack_limit)
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)
bool IsWasmModuleObject() const
SuppressMicrotaskExecutionScope(Isolate *isolate, MicrotaskQueue *microtask_queue=nullptr)
V8_INLINE void Set(uint32_t i)
void SetAddHistogramSampleFunction(AddHistogramSampleCallback)
V8_INLINE Isolate * GetIsolate() const
static Local< Symbol > New(Isolate *isolate, Local< String > description=Local< String >())
size_t total_physical_size()
V8_INLINE TracedReference< S > & As() const
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
void NotifyEmptyEmbedderStack()
size_t external_script_source_size()
static const int kDataIndex
void SetTreatArrayBufferViewsAsHostObjects(bool mode)
virtual void EnqueueMicrotask(Isolate *isolate, Local< Function > microtask)=0
JSEntryStub js_run_microtasks_entry_stub
Isolate & operator=(const Isolate &)=delete
size_t max_zone_pool_size() const
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)
V8_INLINE Local< Primitive > Undefined(Isolate *isolate)
const line_info_t * line_number_table
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)
static bool PCIsInV8(size_t code_pages_length, const MemoryRange *code_pages, void *pc)
bool(* WasmThreadsEnabledCallback)(Local< Context > context)
V8_INLINE bool ShouldThrowOnError() 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)
static std::unique_ptr< BackingStore > NewBackingStore(void *data, size_t byte_length, BackingStoreDeleterCallback deleter, void *deleter_data)
bool(* AllowCodeGenerationFromStringsCallback)(Local< Context > context, Local< String > source)
size_t ByteLength() const
Value(const Value &)=delete
static Local< SharedArrayBuffer > New(Isolate *isolate, std::shared_ptr< BackingStore > backing_store)
static V8_INLINE void * GetAlignedPointerFromInternalField(const PersistentBase< Object > &object, int index)
static const int kTheHoleValueRootIndex
static V8_INLINE void * GetAlignedPointerFromInternalField(const TracedReferenceBase< Object > &object, int index)
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)
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)
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)
void size_t ArrayBufferCreationMode mode
static const int kNodeStateIsWeakValue
Local< Symbol > ValueOf() const
void set_max_zone_pool_size(size_t bytes)
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)
TracedReference< T > & operator=(const TracedReference< S > &rhs)
const int kApiSystemPointerSize
static bool EnableWebAssemblyTrapHandler(bool use_v8_signal_handler)
void set_initial_old_generation_size_in_bytes(size_t initial_size)
V8_INLINE void SetFinalizationCallback(void *parameter, WeakCallbackInfo< void >::Callback callback)
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()
static Local< Symbol > For(Isolate *isolate, Local< String > description)
Local< String > GetScriptNameOrSourceURL() const
int GetWasmFunctionIndex() 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()
MemorySpan< const uint8_t > serialized_module
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()
static Local< ArrayBuffer > New(Isolate *isolate, std::shared_ptr< BackingStore > backing_store)
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()
V8_INLINE TracedReferenceBase< S > & As() const
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)
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 std::unique_ptr< BackingStore > NewBackingStore(Isolate *isolate, size_t byte_length)
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
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
V8_INLINE TracedReference & operator=(const TracedReference &rhs)
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)
virtual bool ShouldMeasure(Local< Context > context)=0
static const int kReturnValueDefaultValueIndex
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, Local< Value > key)
MaybeLocal< Promise > MeasureMemory(Local< Context > context, MeasureMemoryMode mode)
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)
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
JSEntryStub js_construct_entry_stub
virtual ~MeasureMemoryDelegate()=default
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)
V8_INLINE bool operator!=(const Local< S > &that) const
static const int kOddballType
static const int kInternalFieldCount
void(* JitCodeEventHandler)(const JitCodeEvent *event)
static V8_INLINE String * Cast(v8::Value *obj)
bool HasNamedLookupInterceptor()
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)
static MaybeLocal< WasmModuleObject > FromCompiledModule(Isolate *isolate, const CompiledWasmModule &)
V8_INLINE bool IsWeak() const
void(* PromiseHook)(PromiseHookType type, Local< Promise > promise, Local< Value > parent)
static constexpr size_t kMinCodePagesBufferSize
static void SetFlagsFromString(const char *str, size_t length)
virtual bool IsRootForNonTracingGC(const v8::TracedReference< v8::Value > &handle)
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)
MaybeLocal< String > modified_source
static const int kFalseValueRootIndex
void set_configurable(bool configurable)
void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback)
bool StringEquals(Local< String > str)
virtual bool AdvanceTracing(double deadline_in_ms)=0
void Externalize(const std::shared_ptr< BackingStore > &backing_store)
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)
TracedReference(Isolate *isolate, Local< S > that)
V8_WARN_UNUSED_RESULT MaybeLocal< Object > NewRemoteInstance()
void Set(Isolate *isolate, int index, Local< Primitive > item)
#define V8_DEPRECATED(message)
std::shared_ptr< BackingStore > GetBackingStore()
Local< T > Get(Isolate *isolate) const
static const int kShouldThrowOnErrorIndex
static V8_INLINE Local< T > New(Isolate *isolate, const TracedReferenceBase< T > &that)
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
V8_INLINE bool operator==(const Local< S > &that) 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
V8_INLINE bool operator==(const TracedReferenceBase< S > &that) 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
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 V8_WARN_UNUSED_RESULT MaybeLocal< Value > StackTrace(Local< Context > context, Local< Value > exception)
static Isolate * GetCurrent()
V8_WARN_UNUSED_RESULT MaybeLocal< Function > GetFunction(Local< Context > context)
virtual void VisitTracedGlobalHandle(const TracedGlobal< Value > &handle)
JSEntryStub js_construct_entry_stub
Local< String > GetScriptName() const
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)
V8_WARN_UNUSED_RESULT MaybeLocal< Object > Exec(Local< Context > context, Local< String > subject)
void RegisterEmbedderReference(const TracedReferenceBase< v8::Data > &ref)
void SetSecondPassCallback(Callback callback) const
void set_max_old_space_size(size_t limit_in_mb)
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
V8_INLINE TracedReference(const TracedReference< S > &other)
static V8_INLINE internal::Address * GetRoot(v8::Isolate *isolate, int index)
MemorySpan< const uint8_t > MemorySpan< const uint8_t > wire_bytes
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
static std::unique_ptr< MeasureMemoryDelegate > Default(Isolate *isolate, Local< Context > context, Local< Promise::Resolver > promise_resolver, MeasureMemoryMode mode)
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
#define V8_DEPRECATE_SOON(message)
static Local< Uint16Array > New(Local< ArrayBuffer > array_buffer, size_t byte_offset, size_t length)
static Local< Symbol > ForApi(Isolate *isolate, Local< String > description)
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)
void set_max_semi_space_size_in_kb(size_t limit_in_kb)
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)
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()
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)
static void GetSharedMemoryStatistics(SharedMemoryStatistics *statistics)
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
static std::unique_ptr< BackingStore > NewBackingStore(void *data, size_t byte_length, BackingStoreDeleterCallback deleter, void *deleter_data)
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 void InitializeExternalStartupDataFromFile(const char *snapshot_blob)
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)
Local< Context > GetEnteredContext()
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
size_t max_semi_space_size_in_kb() const
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)
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
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 PersistentBase< Object > &object)
static Local< Value > ReferenceError(Local< String > message)
void operator=(const Value &)=delete
virtual ~EmbedderHeapTracer()=default
int ContextDisposedNotification(bool dependant_context=true)
const SharedArrayBuffer::Contents ArrayBufferCreationMode mode
static const int kReturnValueIndex
void RequestGarbageCollectionForTesting(GarbageCollectionType type)
V8_WARN_UNUSED_RESULT Maybe< bool > Delete(Local< Context > context, Local< Value > key)
size_t line_number_table_size
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
static const int kNoWasmFunctionIndexInfo
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)
static bool TryUnwindV8Frames(const JSEntryStubs &entry_stubs, size_t code_pages_length, const MemoryRange *code_pages, RegisterState *register_state, const void *stack_base)
virtual void VisitTracedReference(const TracedReference< Value > &handle)
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)
V8_INLINE TracedReference(TracedReference &&other)
void(* OOMErrorCallback)(const char *location, bool is_heap_oom)
V8_INLINE Local< Value > NewTarget() const
JSEntryStub js_run_microtasks_entry_stub
#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
wasm_source_info_t * wasm_source_info
void size_t ArrayBufferCreationMode mode
size_t read_only_space_used_size()
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
void Reset(Isolate *isolate, const Local< S > &other)
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 bool operator!=(const TracedReferenceBase< S > &that) 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
std::shared_ptr< ArrayBuffer::Allocator > array_buffer_allocator_shared
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 SetUrl(const char *url, size_t length)
void operator=(const Global &)=delete
static V8_INLINE Local< T > New(Isolate *isolate, const PersistentBase< T > &that)
V8_INLINE Local< Value > Data() const
std::shared_ptr< BackingStore > GetBackingStore()
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
V8_INLINE TracedReference & operator=(TracedReference &&rhs)
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)
V8_INLINE void SetWrapperClassId(uint16_t class_id)
friend class TracedReferenceBase
virtual ~Delegate()=default
virtual bool IsCacheable() const
V8_INLINE TracedReference(TracedReference< S > &&other)
V8_WARN_UNUSED_RESULT Maybe< bool > Has(Local< Context > context, Local< Value > key)
size_t CopyCodePages(size_t capacity, MemoryRange *code_pages_out)
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
Local< Value > Description() const