v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-object.h
Go to the documentation of this file.
1// Copyright 2021 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef INCLUDE_V8_OBJECT_H_
6#define INCLUDE_V8_OBJECT_H_
7
8#include "v8-internal.h" // NOLINT(build/include_directory)
9#include "v8-local-handle.h" // NOLINT(build/include_directory)
10#include "v8-maybe.h" // NOLINT(build/include_directory)
11#include "v8-persistent-handle.h" // NOLINT(build/include_directory)
12#include "v8-primitive.h" // NOLINT(build/include_directory)
13#include "v8-sandbox.h" // NOLINT(build/include_directory)
14#include "v8-traced-handle.h" // NOLINT(build/include_directory)
15#include "v8-value.h" // NOLINT(build/include_directory)
16#include "v8config.h" // NOLINT(build/include_directory)
17
18namespace v8 {
19
20class Array;
21class Function;
22class FunctionTemplate;
23template <typename T>
25
31class V8_EXPORT Private : public Data {
32 public:
36 Local<Value> Name() const;
37
41 static Local<Private> New(Isolate* isolate,
43
53 static Local<Private> ForApi(Isolate* isolate, Local<String> name);
54
55 V8_INLINE static Private* Cast(Data* data);
56
57 private:
59
60 static void CheckCast(Data* that);
61};
62
92 public:
93 // GenericDescriptor
95
96 // DataDescriptor
97 explicit PropertyDescriptor(Local<Value> value);
98
99 // DataDescriptor with writable property
100 PropertyDescriptor(Local<Value> value, bool writable);
101
102 // AccessorDescriptor
104
106
107 Local<Value> value() const;
108 bool has_value() const;
109
110 Local<Value> get() const;
111 bool has_get() const;
112 Local<Value> set() const;
113 bool has_set() const;
114
115 void set_enumerable(bool enumerable);
116 bool enumerable() const;
117 bool has_enumerable() const;
118
119 void set_configurable(bool configurable);
120 bool configurable() const;
121 bool has_configurable() const;
122
123 bool writable() const;
124 bool has_writable() const;
125
126 struct PrivateData;
127 PrivateData* get_private() const { return private_; }
128
130 void operator=(const PropertyDescriptor&) = delete;
131
132 private:
134};
135
141 None = 0,
143 ReadOnly = 1 << 0,
145 DontEnum = 1 << 1,
147 DontDelete = 1 << 2
149
157
161
171 "This enum is no longer used and will be removed in V8 12.9.")
172 AccessControl {
173 DEFAULT V8_ENUM_DEPRECATE_SOON("not used") = 0,
174 };
175
187
203
212
218
224
229
233class V8_EXPORT Object : public Value {
234 public:
244
245 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
246 Local<Value> value);
247
258 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context,
260 Local<Value> value);
261 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context,
262 uint32_t index,
263 Local<Value> value);
264
274 V8_WARN_UNUSED_RESULT Maybe<bool> DefineOwnProperty(
276 PropertyAttribute attributes = None);
277
294 V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty(
295 Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor);
296
302
304 uint32_t index);
305
313
318 V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetOwnPropertyDescriptor(
320
338
341
342 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);
343
345 uint32_t index);
346
351 void SetAccessorProperty(Local<Name> name, Local<Function> getter,
353 PropertyAttribute attributes = None);
354
359 V8_WARN_UNUSED_RESULT Maybe<bool> SetNativeDataProperty(
360 Local<Context> context, Local<Name> name,
363 Local<Value> data = Local<Value>(), PropertyAttribute attributes = None,
364 SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
365 SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
366
375 V8_WARN_UNUSED_RESULT Maybe<bool> SetLazyDataProperty(
376 Local<Context> context, Local<Name> name,
378 PropertyAttribute attributes = None,
379 SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
380 SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
381
388 Maybe<bool> HasPrivate(Local<Context> context, Local<Private> key);
389 Maybe<bool> SetPrivate(Local<Context> context, Local<Private> key,
390 Local<Value> value);
391 Maybe<bool> DeletePrivate(Local<Context> context, Local<Private> key);
393
401 Local<Context> context);
403 Local<Context> context, KeyCollectionMode mode,
404 PropertyFilter property_filter, IndexFilter index_filter,
405 KeyConversionMode key_conversion = KeyConversionMode::kKeepNumbers);
406
412 V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetOwnPropertyNames(
413 Local<Context> context);
414
421 V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetOwnPropertyNames(
422 Local<Context> context, PropertyFilter filter,
423 KeyConversionMode key_conversion = KeyConversionMode::kKeepNumbers);
424
431 "V8 will stop providing access to hidden prototype (i.e. "
432 "JSGlobalObject). Use GetPrototypeV2() instead. "
433 "See http://crbug.com/333672197.")
434 Local<Value> GetPrototype();
435
442 Local<Value> GetPrototypeV2();
443
450 "V8 will stop providing access to hidden prototype (i.e. "
451 "JSGlobalObject). Use SetPrototypeV2() instead. "
452 "See http://crbug.com/333672197.")
453 V8_WARN_UNUSED_RESULT Maybe<bool> SetPrototype(Local<Context> context,
454 Local<Value> prototype);
455
462 V8_WARN_UNUSED_RESULT Maybe<bool> SetPrototypeV2(Local<Context> context,
463 Local<Value> prototype);
464
469 Local<Object> FindInstanceInPrototypeChain(Local<FunctionTemplate> tmpl);
470
476 V8_WARN_UNUSED_RESULT MaybeLocal<String> ObjectProtoToString(
477 Local<Context> context);
478
482 Local<String> GetConstructorName();
483
487 Maybe<bool> SetIntegrityLevel(Local<Context> context, IntegrityLevel level);
488
490 int InternalFieldCount() const;
491
493 V8_INLINE static int InternalFieldCount(
494 const PersistentBase<Object>& object) {
495 return object.template value<Object>()->InternalFieldCount();
496 }
497
500 const BasicTracedReference<Object>& object) {
501 return object.template value<Object>()->InternalFieldCount();
502 }
503
514 V8_INLINE Local<Data> GetInternalField(int index);
515
517 void SetInternalField(int index, Local<Data> data);
518
524 V8_INLINE void* GetAlignedPointerFromInternalField(int index);
525 V8_INLINE void* GetAlignedPointerFromInternalField(v8::Isolate* isolate,
526 int index);
527
530 const PersistentBase<Object>& object, int index) {
531 return object.template value<Object>()->GetAlignedPointerFromInternalField(
532 index);
533 }
534
537 const BasicTracedReference<Object>& object, int index) {
538 return object.template value<Object>()->GetAlignedPointerFromInternalField(
539 index);
540 }
541
547 void SetAlignedPointerInInternalField(int index, void* value);
548 void SetAlignedPointerInInternalFields(int argc, int indices[],
549 void* values[]);
550
561 template <CppHeapPointerTag tag, typename T = void>
562 static V8_INLINE T* Unwrap(v8::Isolate* isolate,
563 const v8::Local<v8::Object>& wrapper);
564 template <CppHeapPointerTag tag, typename T = void>
565 static V8_INLINE T* Unwrap(v8::Isolate* isolate,
566 const PersistentBase<Object>& wrapper);
567 template <CppHeapPointerTag tag, typename T = void>
568 static V8_INLINE T* Unwrap(v8::Isolate* isolate,
569 const BasicTracedReference<Object>& wrapper);
570
571 template <typename T = void>
572 static V8_INLINE T* Unwrap(v8::Isolate* isolate,
573 const v8::Local<v8::Object>& wrapper,
574 CppHeapPointerTagRange tag_range);
575 template <typename T = void>
576 static V8_INLINE T* Unwrap(v8::Isolate* isolate,
577 const PersistentBase<Object>& wrapper,
578 CppHeapPointerTagRange tag_range);
579 template <typename T = void>
580 static V8_INLINE T* Unwrap(v8::Isolate* isolate,
581 const BasicTracedReference<Object>& wrapper,
582 CppHeapPointerTagRange tag_range);
583
593 template <CppHeapPointerTag tag>
594 static V8_INLINE void Wrap(v8::Isolate* isolate,
595 const v8::Local<v8::Object>& wrapper,
596 void* wrappable);
597 template <CppHeapPointerTag tag>
598 static V8_INLINE void Wrap(v8::Isolate* isolate,
599 const PersistentBase<Object>& wrapper,
600 void* wrappable);
601 template <CppHeapPointerTag tag>
602 static V8_INLINE void Wrap(v8::Isolate* isolate,
603 const BasicTracedReference<Object>& wrapper,
604 void* wrappable);
605 static V8_INLINE void Wrap(v8::Isolate* isolate,
606 const v8::Local<v8::Object>& wrapper,
607 void* wrappable, CppHeapPointerTag tag);
608 static V8_INLINE void Wrap(v8::Isolate* isolate,
609 const PersistentBase<Object>& wrapper,
610 void* wrappable, CppHeapPointerTag tag);
611 static V8_INLINE void Wrap(v8::Isolate* isolate,
612 const BasicTracedReference<Object>& wrapper,
613 void* wrappable, CppHeapPointerTag tag);
614
621 V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
623 V8_WARN_UNUSED_RESULT Maybe<bool> HasOwnProperty(Local<Context> context,
624 uint32_t index);
638 V8_WARN_UNUSED_RESULT Maybe<bool> HasRealNamedProperty(Local<Context> context,
640 V8_WARN_UNUSED_RESULT Maybe<bool> HasRealIndexedProperty(
641 Local<Context> context, uint32_t index);
642 V8_WARN_UNUSED_RESULT Maybe<bool> HasRealNamedCallbackProperty(
644
649 V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedPropertyInPrototypeChain(
651
658 GetRealNamedPropertyAttributesInPrototypeChain(Local<Context> context,
660
666 V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedProperty(
668
674 V8_WARN_UNUSED_RESULT Maybe<PropertyAttribute> GetRealNamedPropertyAttributes(
676
678 bool HasNamedLookupInterceptor() const;
679
681 bool HasIndexedLookupInterceptor() const;
682
690 int GetIdentityHash();
691
698 Local<Object> Clone(v8::Isolate* isolate);
699 Local<Object> Clone();
700
706 MaybeLocal<Context> GetCreationContext(v8::Isolate* isolate);
707 V8_DEPRECATE_SOON("Use the version with the isolate argument.")
708 MaybeLocal<Context> GetCreationContext();
709
715 Local<Context> GetCreationContextChecked(v8::Isolate* isolate);
716 V8_DEPRECATE_SOON("Use the version with the isolate argument.")
717 Local<Context> GetCreationContextChecked();
718
720 V8_INLINE static MaybeLocal<Context> GetCreationContext(
721 v8::Isolate* isolate, const PersistentBase<Object>& object) {
722 return object.template value<Object>()->GetCreationContext(isolate);
723 }
724 V8_DEPRECATE_SOON("Use the version with the isolate argument.")
725 V8_INLINE static MaybeLocal<Context> GetCreationContext(
726 const PersistentBase<Object>& object);
727
742 void* GetAlignedPointerFromEmbedderDataInCreationContext(v8::Isolate* isolate,
743 int index);
744 void* GetAlignedPointerFromEmbedderDataInCreationContext(int index);
745
751 bool IsCallable() const;
752
756 bool IsConstructor() const;
757
769 bool IsApiWrapper() const;
770
776 bool IsUndetectable() const;
777
782 V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsFunction(Local<Context> context,
783 Local<Value> recv,
784 int argc,
785 Local<Value> argv[]);
786
792 V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsConstructor(
793 Local<Context> context, int argc, Local<Value> argv[]);
794
798 Isolate* GetIsolate();
799
800 V8_INLINE static Isolate* GetIsolate(const TracedReference<Object>& handle) {
801 return handle.template value<Object>()->GetIsolate();
802 }
803
813 MaybeLocal<Array> PreviewEntries(bool* is_key_value);
814
815 static Local<Object> New(Isolate* isolate);
816
825 static Local<Object> New(Isolate* isolate, Local<Value> prototype_or_null,
826 Local<Name>* names, Local<Value>* values,
827 size_t length);
828
829 V8_INLINE static Object* Cast(Value* obj);
830
839 bool IsCodeLike(Isolate* isolate) const;
840
841 private:
842 static void* Unwrap(v8::Isolate* isolate, internal::Address wrapper_obj,
843 CppHeapPointerTagRange tag_range);
844 static void Wrap(v8::Isolate* isolate, internal::Address wrapper_obj,
845 CppHeapPointerTag tag, void* wrappable);
846
848 static void CheckCast(Value* obj);
849 Local<Data> SlowGetInternalField(int index);
850 void* SlowGetAlignedPointerFromInternalField(int index);
851 void* SlowGetAlignedPointerFromInternalField(v8::Isolate* isolate, int index);
852};
853
854// --- Implementation ---
855
857#ifndef V8_ENABLE_CHECKS
858 using A = internal::Address;
859 using I = internal::Internals;
861 // Fast path: If the object is a plain JSObject, which is the common case, we
862 // know where to find the internal fields and can return the value directly.
863 int instance_type = I::GetInstanceType(obj);
864 if (I::CanHaveInternalField(instance_type)) {
865 int offset = I::kJSAPIObjectWithEmbedderSlotsHeaderSize +
866 (I::kEmbedderDataSlotSize * index);
867 A value = I::ReadRawField<A>(obj, offset);
868#ifdef V8_COMPRESS_POINTERS
869 // We read the full pointer value and then decompress it in order to avoid
870 // dealing with potential endiannes issues.
871 value = I::DecompressTaggedField(obj, static_cast<uint32_t>(value));
872#endif
873
874 auto isolate = reinterpret_cast<v8::Isolate*>(
876 return Local<Data>::New(isolate, value);
877 }
878#endif
879 return SlowGetInternalField(index);
880}
881
883 int index) {
884#if !defined(V8_ENABLE_CHECKS)
885 using A = internal::Address;
886 using I = internal::Internals;
888 // Fast path: If the object is a plain JSObject, which is the common case, we
889 // know where to find the internal fields and can return the value directly.
890 auto instance_type = I::GetInstanceType(obj);
891 if (V8_LIKELY(I::CanHaveInternalField(instance_type))) {
892 int offset = I::kJSAPIObjectWithEmbedderSlotsHeaderSize +
893 (I::kEmbedderDataSlotSize * index) +
894 I::kEmbedderDataSlotExternalPointerOffset;
895 A value =
896 I::ReadExternalPointerField<internal::kEmbedderDataSlotPayloadTag>(
897 isolate, obj, offset);
898 return reinterpret_cast<void*>(value);
899 }
900#endif
901 return SlowGetAlignedPointerFromInternalField(isolate, index);
902}
903
905#if !defined(V8_ENABLE_CHECKS)
906 using A = internal::Address;
907 using I = internal::Internals;
909 // Fast path: If the object is a plain JSObject, which is the common case, we
910 // know where to find the internal fields and can return the value directly.
911 auto instance_type = I::GetInstanceType(obj);
912 if (V8_LIKELY(I::CanHaveInternalField(instance_type))) {
913 int offset = I::kJSAPIObjectWithEmbedderSlotsHeaderSize +
914 (I::kEmbedderDataSlotSize * index) +
915 I::kEmbedderDataSlotExternalPointerOffset;
916 Isolate* isolate = I::GetIsolateForSandbox(obj);
917 A value =
918 I::ReadExternalPointerField<internal::kEmbedderDataSlotPayloadTag>(
919 isolate, obj, offset);
920 return reinterpret_cast<void*>(value);
921 }
922#endif
924}
925
926// static
927template <CppHeapPointerTag tag, typename T>
929 CppHeapPointerTagRange tag_range(tag, tag);
930 auto obj = internal::ValueHelper::ValueAsAddress(*wrapper);
931#if !defined(V8_ENABLE_CHECKS)
933 isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range);
934#else // defined(V8_ENABLE_CHECKS)
935 return reinterpret_cast<T*>(Unwrap(isolate, obj, tag_range));
936#endif // defined(V8_ENABLE_CHECKS)
937}
938
939// static
940template <CppHeapPointerTag tag, typename T>
942 CppHeapPointerTagRange tag_range(tag, tag);
943 auto obj =
944 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
945#if !defined(V8_ENABLE_CHECKS)
947 isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range);
948#else // defined(V8_ENABLE_CHECKS)
949 return reinterpret_cast<T*>(Unwrap(isolate, obj, tag_range));
950#endif // defined(V8_ENABLE_CHECKS)
951}
952
953// static
954template <CppHeapPointerTag tag, typename T>
956 const BasicTracedReference<Object>& wrapper) {
957 CppHeapPointerTagRange tag_range(tag, tag);
958 auto obj =
959 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
960#if !defined(V8_ENABLE_CHECKS)
962 isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range);
963#else // defined(V8_ENABLE_CHECKS)
964 return reinterpret_cast<T*>(Unwrap(isolate, obj, tag_range));
965#endif // defined(V8_ENABLE_CHECKS)
966}
967
968// static
969template <typename T>
971 CppHeapPointerTagRange tag_range) {
972 auto obj = internal::ValueHelper::ValueAsAddress(*wrapper);
973#if !defined(V8_ENABLE_CHECKS)
975 isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range);
976#else // defined(V8_ENABLE_CHECKS)
977 return reinterpret_cast<T*>(Unwrap(isolate, obj, tag_range));
978#endif // defined(V8_ENABLE_CHECKS)
979}
980
981// static
982template <typename T>
984 CppHeapPointerTagRange tag_range) {
985 auto obj =
986 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
987#if !defined(V8_ENABLE_CHECKS)
989 isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range);
990#else // defined(V8_ENABLE_CHECKS)
991
992 return reinterpret_cast<T*>(Unwrap(isolate, obj, tag_range));
993#endif // defined(V8_ENABLE_CHECKS)
994}
995
996// static
997template <typename T>
999 const BasicTracedReference<Object>& wrapper,
1000 CppHeapPointerTagRange tag_range) {
1001 auto obj =
1002 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
1003#if !defined(V8_ENABLE_CHECKS)
1005 isolate, obj, internal::Internals::kJSObjectHeaderSize, tag_range);
1006#else // defined(V8_ENABLE_CHECKS)
1007 return reinterpret_cast<T*>(Unwrap(isolate, obj, tag_range));
1008#endif // defined(V8_ENABLE_CHECKS)
1009}
1010
1011// static
1012template <CppHeapPointerTag tag>
1013void Object::Wrap(v8::Isolate* isolate, const v8::Local<v8::Object>& wrapper,
1014 void* wrappable) {
1015 auto obj = internal::ValueHelper::ValueAsAddress(*wrapper);
1016 Wrap(isolate, obj, tag, wrappable);
1017}
1018
1019// static
1020template <CppHeapPointerTag tag>
1022 void* wrappable) {
1023 auto obj =
1024 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
1025 Wrap(isolate, obj, tag, wrappable);
1026}
1027
1028// static
1029template <CppHeapPointerTag tag>
1031 const BasicTracedReference<Object>& wrapper,
1032 void* wrappable) {
1033 auto obj =
1034 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
1035 Wrap(isolate, obj, tag, wrappable);
1036}
1037
1038// static
1039void Object::Wrap(v8::Isolate* isolate, const v8::Local<v8::Object>& wrapper,
1040 void* wrappable, CppHeapPointerTag tag) {
1041 auto obj = internal::ValueHelper::ValueAsAddress(*wrapper);
1042 Wrap(isolate, obj, tag, wrappable);
1043}
1044
1045// static
1047 void* wrappable, CppHeapPointerTag tag) {
1048 auto obj =
1049 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
1050 Wrap(isolate, obj, tag, wrappable);
1051}
1052
1053// static
1055 const BasicTracedReference<Object>& wrapper, void* wrappable,
1056 CppHeapPointerTag tag) {
1057 auto obj =
1058 internal::ValueHelper::ValueAsAddress(wrapper.template value<Object>());
1059 Wrap(isolate, obj, tag, wrappable);
1060}
1061
1063#ifdef V8_ENABLE_CHECKS
1064 CheckCast(data);
1065#endif
1066 return reinterpret_cast<Private*>(data);
1067}
1068
1070#ifdef V8_ENABLE_CHECKS
1071 CheckCast(value);
1072#endif
1073 return static_cast<Object*>(value);
1074}
1075
1076} // namespace v8
1077
1078#endif // INCLUDE_V8_OBJECT_H_
union v8::internal::@341::BuiltinMetadata::KindSpecificData data
PropertyT * setter
PropertyT * getter
static V8_INLINE Local< T > New(Isolate *isolate, Local< T > that)
static void * Unwrap(v8::Isolate *isolate, internal::Address wrapper_obj, CppHeapPointerTagRange tag_range)
static V8_INLINE void Wrap(v8::Isolate *isolate, const BasicTracedReference< Object > &wrapper, void *wrappable)
void * SlowGetAlignedPointerFromInternalField(int index)
Definition api.cc:6320
static V8_INLINE T * Unwrap(v8::Isolate *isolate, const PersistentBase< Object > &wrapper)
static V8_INLINE Object * Cast(Value *obj)
Definition v8-object.h:1069
V8_INLINE void * GetAlignedPointerFromInternalField(int index)
Definition v8-object.h:904
Local< Data > SlowGetInternalField(int index)
Definition api.cc:6290
V8_DEPRECATE_SOON("V8 will stop providing access to hidden prototype (i.e. " "JSGlobalObject). Use GetPrototypeV2() instead. " "See http://crbug.com/333672197.") Local< Value > GetPrototype()
static V8_INLINE void Wrap(v8::Isolate *isolate, const v8::Local< v8::Object > &wrapper, void *wrappable)
static V8_INLINE void * GetAlignedPointerFromInternalField(const BasicTracedReference< Object > &object, int index)
Definition v8-object.h:536
static V8_INLINE void * GetAlignedPointerFromInternalField(const PersistentBase< Object > &object, int index)
Definition v8-object.h:529
V8_INLINE Local< Data > GetInternalField(int index)
Definition v8-object.h:856
static V8_INLINE T * Unwrap(v8::Isolate *isolate, const v8::Local< v8::Object > &wrapper)
static V8_INLINE T * Unwrap(v8::Isolate *isolate, const PersistentBase< Object > &wrapper, CppHeapPointerTagRange tag_range)
static V8_INLINE T * Unwrap(v8::Isolate *isolate, const BasicTracedReference< Object > &wrapper)
static void Wrap(v8::Isolate *isolate, internal::Address wrapper_obj, CppHeapPointerTag tag, void *wrappable)
static V8_INLINE T * Unwrap(v8::Isolate *isolate, const BasicTracedReference< Object > &wrapper, CppHeapPointerTagRange tag_range)
static V8_INLINE T * Unwrap(v8::Isolate *isolate, const v8::Local< v8::Object > &wrapper, CppHeapPointerTagRange tag_range)
static void CheckCast(Value *obj)
Definition api.cc:3853
static V8_INLINE void Wrap(v8::Isolate *isolate, const PersistentBase< Object > &wrapper, void *wrappable)
static V8_INLINE int InternalFieldCount(const BasicTracedReference< Object > &object)
Definition v8-object.h:499
static void CheckCast(Data *that)
Definition api.cc:3888
static V8_INLINE Private * Cast(Data *data)
Definition v8-object.h:1062
PrivateData * private_
Definition v8-object.h:133
PrivateData * get_private() const
Definition v8-object.h:127
void operator=(const PropertyDescriptor &)=delete
PropertyDescriptor(const PropertyDescriptor &)=delete
static const int kJSObjectHeaderSize
static V8_INLINE Address ValueAsAddress(const T *value)
Handle< SharedFunctionInfo > info
OptionalOpIndex index
int32_t offset
TNode< Object > receiver
const std::string property
V8_INLINE Address ReadCppHeapPointerField(Address field_address, IsolateForPointerCompression isolate)
V8_EXPORT internal::Isolate * IsolateFromNeverReadOnlySpaceObject(Address obj)
IntegrityLevel
Definition v8-object.h:228
PropertyAttribute
Definition v8-object.h:139
@ DontEnum
Definition v8-object.h:145
@ None
Definition v8-object.h:141
@ DontDelete
Definition v8-object.h:147
@ ReadOnly
Definition v8-object.h:143
KeyCollectionMode
Definition v8-object.h:211
void(*)(Local< Name > property, const PropertyCallbackInfo< Value > &info) AccessorNameGetterCallback
Definition v8-object.h:155
SideEffectType
Definition v8-object.h:198
IndexFilter
Definition v8-object.h:217
KeyConversionMode
Definition v8-object.h:223
CppHeapPointerTag
Definition v8-sandbox.h:28
void(*)(Local< Name > property, Local< Value > value, const PropertyCallbackInfo< void > &info) AccessorNameSetterCallback
Definition v8-object.h:158
PropertyFilter
Definition v8-object.h:179
@ ONLY_CONFIGURABLE
Definition v8-object.h:183
@ SKIP_SYMBOLS
Definition v8-object.h:185
@ ONLY_WRITABLE
Definition v8-object.h:181
@ ALL_PROPERTIES
Definition v8-object.h:180
@ SKIP_STRINGS
Definition v8-object.h:184
@ ONLY_ENUMERABLE
Definition v8-object.h:182
#define I(name, number_of_args, result_size)
Definition runtime.cc:36
#define V8_EXPORT
Definition v8config.h:800
#define V8_INLINE
Definition v8config.h:500
#define V8_DEPRECATE_SOON(message)
Definition v8config.h:614
#define V8_LIKELY(condition)
Definition v8config.h:661
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671
std::unique_ptr< ValueMirror > value
std::unique_ptr< ValueMirror > key