libv8-node 22.7.0.3-arm64-darwin → 23.6.1.0-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libv8/node/version.rb +3 -3
  3. data/vendor/v8/arm64-darwin/libv8/obj/libv8_monolith.a +0 -0
  4. data/vendor/v8/include/cppgc/allocation.h +10 -11
  5. data/vendor/v8/include/cppgc/garbage-collected.h +8 -0
  6. data/vendor/v8/include/cppgc/heap-statistics.h +2 -0
  7. data/vendor/v8/include/cppgc/internal/api-constants.h +6 -1
  8. data/vendor/v8/include/cppgc/internal/compiler-specific.h +9 -1
  9. data/vendor/v8/include/cppgc/internal/gc-info.h +12 -10
  10. data/vendor/v8/include/cppgc/internal/member-storage.h +6 -0
  11. data/vendor/v8/include/cppgc/internal/name-trait.h +5 -1
  12. data/vendor/v8/include/cppgc/name-provider.h +7 -0
  13. data/vendor/v8/include/v8-array-buffer.h +44 -24
  14. data/vendor/v8/include/v8-callbacks.h +10 -5
  15. data/vendor/v8/include/v8-context.h +41 -9
  16. data/vendor/v8/include/v8-cppgc.h +3 -55
  17. data/vendor/v8/include/v8-date.h +9 -0
  18. data/vendor/v8/include/v8-embedder-heap.h +4 -1
  19. data/vendor/v8/include/v8-exception.h +70 -0
  20. data/vendor/v8/include/v8-fast-api-calls.h +31 -38
  21. data/vendor/v8/include/v8-function-callback.h +203 -62
  22. data/vendor/v8/include/v8-function.h +4 -3
  23. data/vendor/v8/include/v8-handle-base.h +2 -2
  24. data/vendor/v8/include/v8-initialization.h +18 -1
  25. data/vendor/v8/include/v8-inspector.h +6 -3
  26. data/vendor/v8/include/v8-internal.h +303 -58
  27. data/vendor/v8/include/v8-isolate.h +58 -39
  28. data/vendor/v8/include/v8-local-handle.h +18 -19
  29. data/vendor/v8/include/v8-message.h +0 -21
  30. data/vendor/v8/include/v8-metrics.h +4 -0
  31. data/vendor/v8/include/v8-microtask-queue.h +0 -5
  32. data/vendor/v8/include/v8-object.h +284 -35
  33. data/vendor/v8/include/v8-persistent-handle.h +0 -19
  34. data/vendor/v8/include/v8-platform.h +21 -35
  35. data/vendor/v8/include/v8-primitive.h +92 -1
  36. data/vendor/v8/include/v8-profiler.h +38 -1
  37. data/vendor/v8/include/v8-promise.h +2 -2
  38. data/vendor/v8/include/v8-sandbox.h +173 -0
  39. data/vendor/v8/include/v8-script.h +44 -14
  40. data/vendor/v8/include/v8-snapshot.h +38 -2
  41. data/vendor/v8/include/v8-template.h +105 -263
  42. data/vendor/v8/include/v8-traced-handle.h +4 -15
  43. data/vendor/v8/include/v8-unwinder.h +2 -1
  44. data/vendor/v8/include/v8-util.h +1 -117
  45. data/vendor/v8/include/v8-value.h +3 -2
  46. data/vendor/v8/include/v8-version.h +3 -3
  47. data/vendor/v8/include/v8-wasm.h +3 -0
  48. data/vendor/v8/include/v8config.h +51 -7
  49. metadata +4 -3
@@ -9,6 +9,7 @@
9
9
  #include <string_view>
10
10
 
11
11
  #include "v8-data.h" // NOLINT(build/include_directory)
12
+ #include "v8-exception.h" // NOLINT(build/include_directory)
12
13
  #include "v8-function-callback.h" // NOLINT(build/include_directory)
13
14
  #include "v8-local-handle.h" // NOLINT(build/include_directory)
14
15
  #include "v8-memory-span.h" // NOLINT(build/include_directory)
@@ -60,6 +61,22 @@ class V8_EXPORT Template : public Data {
60
61
  V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value,
61
62
  PropertyAttribute attributes = None);
62
63
 
64
+ /**
65
+ * Sets an "accessor property" on the object template, see
66
+ * https://tc39.es/ecma262/#sec-object-type.
67
+ *
68
+ * Whenever the property with the given name is accessed on objects
69
+ * created from this ObjectTemplate the getter and setter functions
70
+ * are called.
71
+ *
72
+ * \param name The name of the property for which an accessor is added.
73
+ * \param getter The callback to invoke when getting the property.
74
+ * \param setter The callback to invoke when setting the property.
75
+ * \param data A piece of data that will be passed to the getter and setter
76
+ * callbacks whenever they are invoked.
77
+ * \param attribute The attributes of the property for which an accessor
78
+ * is added.
79
+ */
63
80
  void SetAccessorProperty(
64
81
  Local<Name> name,
65
82
  Local<FunctionTemplate> getter = Local<FunctionTemplate>(),
@@ -67,12 +84,18 @@ class V8_EXPORT Template : public Data {
67
84
  PropertyAttribute attribute = None);
68
85
 
69
86
  /**
87
+ * Sets a "data property" on the object template, see
88
+ * https://tc39.es/ecma262/#sec-object-type.
89
+ *
70
90
  * Whenever the property with the given name is accessed on objects
71
91
  * created from this Template the getter and setter callbacks
72
92
  * are called instead of getting and setting the property directly
73
93
  * on the JavaScript object.
94
+ * Note that in case a property is written via a "child" object, the setter
95
+ * will not be called according to the JavaScript specification. See
96
+ * https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver.
74
97
  *
75
- * \param name The name of the property for which an accessor is added.
98
+ * \param name The name of the data property for which an accessor is added.
76
99
  * \param getter The callback to invoke when getting the property.
77
100
  * \param setter The callback to invoke when setting the property.
78
101
  * \param data A piece of data that will be passed to the getter and setter
@@ -80,27 +103,6 @@ class V8_EXPORT Template : public Data {
80
103
  * \param attribute The attributes of the property for which an accessor
81
104
  * is added.
82
105
  */
83
- V8_DEPRECATE_SOON("Use SetNativeDataProperty without AccessControl instead")
84
- void SetNativeDataProperty(
85
- Local<String> name, AccessorGetterCallback getter,
86
- AccessorSetterCallback setter, Local<Value> data,
87
- PropertyAttribute attribute, AccessControl settings,
88
- SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
89
- SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
90
- V8_DEPRECATE_SOON("Use SetNativeDataProperty without AccessControl instead")
91
- void SetNativeDataProperty(
92
- Local<Name> name, AccessorNameGetterCallback getter,
93
- AccessorNameSetterCallback setter, Local<Value> data,
94
- PropertyAttribute attribute, AccessControl settings,
95
- SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
96
- SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
97
- V8_DEPRECATE_SOON("Use SetNativeDataProperty with Local<Name> instead")
98
- void SetNativeDataProperty(
99
- Local<String> name, AccessorGetterCallback getter,
100
- AccessorSetterCallback setter = nullptr,
101
- Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
102
- SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
103
- SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
104
106
  void SetNativeDataProperty(
105
107
  Local<Name> name, AccessorNameGetterCallback getter,
106
108
  AccessorNameSetterCallback setter = nullptr,
@@ -142,7 +144,8 @@ enum class Intercepted : uint8_t { kNo = 0, kYes = 1 };
142
144
  * Interceptor for get requests on an object.
143
145
  *
144
146
  * If the interceptor handles the request (i.e. the property should not be
145
- * looked up beyond the interceptor) it should
147
+ * looked up beyond the interceptor or in case an exception was thrown) it
148
+ * should
146
149
  * - (optionally) use info.GetReturnValue().Set()` to set the return value
147
150
  * (by default the result is set to v8::Undefined),
148
151
  * - return `Intercepted::kYes`.
@@ -194,7 +197,8 @@ using GenericNamedPropertyGetterCallback =
194
197
  * Interceptor for set requests on an object.
195
198
  *
196
199
  * If the interceptor handles the request (i.e. the property should not be
197
- * looked up beyond the interceptor) it should return `Intercepted::kYes`.
200
+ * looked up beyond the interceptor or in case an exception was thrown) it
201
+ * should return `Intercepted::kYes`.
198
202
  * If the interceptor does not handle the request it must return
199
203
  * `Intercepted::kNo` and it must not produce side effects.
200
204
  *
@@ -229,9 +233,10 @@ using GenericNamedPropertySetterCallback =
229
233
  * defineProperty().
230
234
  *
231
235
  * If the interceptor handles the request (i.e. the property should not be
232
- * looked up beyond the interceptor) it should
233
- * - use `info.GetReturnValue().Set()` to set to an Integer value encoding
234
- * a `v8::PropertyAttribute` bits,
236
+ * looked up beyond the interceptor or in case an exception was thrown) it
237
+ * should
238
+ * - (optionally) use `info.GetReturnValue().Set()` to set to an Integer
239
+ * value encoding a `v8::PropertyAttribute` bits,
235
240
  * - return `Intercepted::kYes`.
236
241
  * If the interceptor does not handle the request it must return
237
242
  * `Intercepted::kNo` and it must not produce side effects.
@@ -263,9 +268,10 @@ using GenericNamedPropertyQueryCallback =
263
268
  * Interceptor for delete requests on an object.
264
269
  *
265
270
  * If the interceptor handles the request (i.e. the property should not be
266
- * looked up beyond the interceptor) it should
267
- * - use `info.GetReturnValue().Set()` to set to a Boolean value indicating
268
- * whether the property deletion was successful or not,
271
+ * looked up beyond the interceptor or in case an exception was thrown) it
272
+ * should
273
+ * - (optionally) use `info.GetReturnValue().Set()` to set to a Boolean value
274
+ * indicating whether the property deletion was successful or not,
269
275
  * - return `Intercepted::kYes`.
270
276
  * If the interceptor does not handle the request it must return
271
277
  * `Intercepted::kNo` and it must not produce side effects.
@@ -311,7 +317,8 @@ using GenericNamedPropertyEnumeratorCallback = NamedPropertyEnumeratorCallback;
311
317
  * Interceptor for defineProperty requests on an object.
312
318
  *
313
319
  * If the interceptor handles the request (i.e. the property should not be
314
- * looked up beyond the interceptor) it should return `Intercepted::kYes`.
320
+ * looked up beyond the interceptor or in case an exception was thrown) it
321
+ * should return `Intercepted::kYes`.
315
322
  * If the interceptor does not handle the request it must return
316
323
  * `Intercepted::kNo` and it must not produce side effects.
317
324
  *
@@ -344,10 +351,11 @@ using GenericNamedPropertyDefinerCallback =
344
351
  * Interceptor for getOwnPropertyDescriptor requests on an object.
345
352
  *
346
353
  * If the interceptor handles the request (i.e. the property should not be
347
- * looked up beyond the interceptor) it should
348
- * - use `info.GetReturnValue().Set()` to set the return value which must be
349
- * object that can be converted to a PropertyDescriptor (for example,
350
- * a value returned by `v8::Object::getOwnPropertyDescriptor`),
354
+ * looked up beyond the interceptor or in case an exception was thrown) it
355
+ * should
356
+ * - (optionally) use `info.GetReturnValue().Set()` to set the return value
357
+ * which must be object that can be converted to a PropertyDescriptor (for
358
+ * example, a value returned by `v8::Object::getOwnPropertyDescriptor`),
351
359
  * - return `Intercepted::kYes`.
352
360
  * If the interceptor does not handle the request it must return
353
361
  * `Intercepted::kNo` and it must not produce side effects.
@@ -379,7 +387,7 @@ using GenericNamedPropertyDescriptorCallback =
379
387
  // removed.
380
388
 
381
389
  /**
382
- * See `v8::GenericNamedPropertyGetterCallback`.
390
+ * See `v8::NamedPropertyGetterCallback`.
383
391
  */
384
392
  using IndexedPropertyGetterCallbackV2 =
385
393
  Intercepted (*)(uint32_t index, const PropertyCallbackInfo<Value>& info);
@@ -388,7 +396,7 @@ using IndexedPropertyGetterCallback =
388
396
  void (*)(uint32_t index, const PropertyCallbackInfo<Value>& info);
389
397
 
390
398
  /**
391
- * See `v8::GenericNamedPropertySetterCallback`.
399
+ * See `v8::NamedPropertySetterCallback`.
392
400
  */
393
401
  using IndexedPropertySetterCallbackV2 = Intercepted (*)(
394
402
  uint32_t index, Local<Value> value, const PropertyCallbackInfo<void>& info);
@@ -398,7 +406,7 @@ using IndexedPropertySetterCallback =
398
406
  const PropertyCallbackInfo<Value>& info);
399
407
 
400
408
  /**
401
- * See `v8::GenericNamedPropertyQueryCallback`.
409
+ * See `v8::NamedPropertyQueryCallback`.
402
410
  */
403
411
  using IndexedPropertyQueryCallbackV2 =
404
412
  Intercepted (*)(uint32_t index, const PropertyCallbackInfo<Integer>& info);
@@ -407,7 +415,7 @@ using IndexedPropertyQueryCallback =
407
415
  void (*)(uint32_t index, const PropertyCallbackInfo<Integer>& info);
408
416
 
409
417
  /**
410
- * See `v8::GenericNamedPropertyDeleterCallback`.
418
+ * See `v8::NamedPropertyDeleterCallback`.
411
419
  */
412
420
  using IndexedPropertyDeleterCallbackV2 =
413
421
  Intercepted (*)(uint32_t index, const PropertyCallbackInfo<Boolean>& info);
@@ -425,7 +433,7 @@ using IndexedPropertyEnumeratorCallback =
425
433
  void (*)(const PropertyCallbackInfo<Array>& info);
426
434
 
427
435
  /**
428
- * See `v8::GenericNamedPropertyDefinerCallback`.
436
+ * See `v8::NamedPropertyDefinerCallback`.
429
437
  */
430
438
  using IndexedPropertyDefinerCallbackV2 =
431
439
  Intercepted (*)(uint32_t index, const PropertyDescriptor& desc,
@@ -436,7 +444,7 @@ using IndexedPropertyDefinerCallback =
436
444
  const PropertyCallbackInfo<Value>& info);
437
445
 
438
446
  /**
439
- * See `v8::GenericNamedPropertyDescriptorCallback`.
447
+ * See `v8::NamedPropertyDescriptorCallback`.
440
448
  */
441
449
  using IndexedPropertyDescriptorCallbackV2 =
442
450
  Intercepted (*)(uint32_t index, const PropertyCallbackInfo<Value>& info);
@@ -489,8 +497,8 @@ enum class ConstructorBehavior { kThrow, kAllow };
489
497
  * proto_t->Set(isolate, "proto_const", v8::Number::New(isolate, 2));
490
498
  *
491
499
  * v8::Local<v8::ObjectTemplate> instance_t = t->InstanceTemplate();
492
- * instance_t->SetAccessor(
493
- String::NewFromUtf8Literal(isolate, "instance_accessor"),
500
+ * instance_t->SetNativeDataProperty(
501
+ * String::NewFromUtf8Literal(isolate, "instance_accessor"),
494
502
  * InstanceAccessorCallback);
495
503
  * instance_t->SetHandler(
496
504
  * NamedPropertyHandlerConfiguration(PropertyHandlerCallback));
@@ -650,6 +658,18 @@ class V8_EXPORT FunctionTemplate : public Template {
650
658
  */
651
659
  void SetClassName(Local<String> name);
652
660
 
661
+ /**
662
+ * Set the interface name of the FunctionTemplate. This is provided as
663
+ * contextual information in an ExceptionPropagationMessage to the embedder.
664
+ */
665
+ void SetInterfaceName(Local<String> name);
666
+
667
+ /**
668
+ * Provides information on the type of FunctionTemplate for embedder
669
+ * exception handling.
670
+ */
671
+ void SetExceptionContext(ExceptionContext context);
672
+
653
673
  /**
654
674
  * When set to true, no access check will be performed on the receiver of a
655
675
  * function call. Currently defaults to true, but this is subject to change.
@@ -752,34 +772,13 @@ struct NamedPropertyHandlerConfiguration {
752
772
  NamedPropertyDescriptorCallback descriptor, //
753
773
  Local<Value> data = Local<Value>(),
754
774
  PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
755
- : getter(reinterpret_cast<void*>(getter)),
756
- setter(reinterpret_cast<void*>(setter)),
757
- query(reinterpret_cast<void*>(query)),
758
- deleter(reinterpret_cast<void*>(deleter)),
759
- enumerator(enumerator),
760
- definer(reinterpret_cast<void*>(definer)),
761
- descriptor(reinterpret_cast<void*>(descriptor)),
762
- data(data),
763
- flags(WithNewSignatureFlag(flags)) {}
764
-
765
- // This variant will be deprecated soon.
766
- NamedPropertyHandlerConfiguration(
767
- GenericNamedPropertyGetterCallback getter,
768
- GenericNamedPropertySetterCallback setter,
769
- GenericNamedPropertyQueryCallback query,
770
- GenericNamedPropertyDeleterCallback deleter,
771
- GenericNamedPropertyEnumeratorCallback enumerator,
772
- GenericNamedPropertyDefinerCallback definer,
773
- GenericNamedPropertyDescriptorCallback descriptor,
774
- Local<Value> data = Local<Value>(),
775
- PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
776
- : getter(reinterpret_cast<void*>(getter)),
777
- setter(reinterpret_cast<void*>(setter)),
778
- query(reinterpret_cast<void*>(query)),
779
- deleter(reinterpret_cast<void*>(deleter)),
775
+ : getter(getter),
776
+ setter(setter),
777
+ query(query),
778
+ deleter(deleter),
780
779
  enumerator(enumerator),
781
- definer(reinterpret_cast<void*>(definer)),
782
- descriptor(reinterpret_cast<void*>(descriptor)),
780
+ definer(definer),
781
+ descriptor(descriptor),
783
782
  data(data),
784
783
  flags(flags) {}
785
784
 
@@ -791,29 +790,10 @@ struct NamedPropertyHandlerConfiguration {
791
790
  NamedPropertyEnumeratorCallback enumerator = nullptr,
792
791
  Local<Value> data = Local<Value>(),
793
792
  PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
794
- : getter(reinterpret_cast<void*>(getter)),
795
- setter(reinterpret_cast<void*>(setter)),
796
- query(reinterpret_cast<void*>(query)),
797
- deleter(reinterpret_cast<void*>(deleter)),
798
- enumerator(enumerator),
799
- definer(nullptr),
800
- descriptor(nullptr),
801
- data(data),
802
- flags(WithNewSignatureFlag(flags)) {}
803
-
804
- // This variant will be deprecated soon.
805
- explicit NamedPropertyHandlerConfiguration(
806
- GenericNamedPropertyGetterCallback getter,
807
- GenericNamedPropertySetterCallback setter = nullptr,
808
- GenericNamedPropertyQueryCallback query = nullptr,
809
- GenericNamedPropertyDeleterCallback deleter = nullptr,
810
- GenericNamedPropertyEnumeratorCallback enumerator = nullptr,
811
- Local<Value> data = Local<Value>(),
812
- PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
813
- : getter(reinterpret_cast<void*>(getter)),
814
- setter(reinterpret_cast<void*>(setter)),
815
- query(reinterpret_cast<void*>(query)),
816
- deleter(reinterpret_cast<void*>(deleter)),
793
+ : getter(getter),
794
+ setter(setter),
795
+ query(query),
796
+ deleter(deleter),
817
797
  enumerator(enumerator),
818
798
  definer(nullptr),
819
799
  descriptor(nullptr),
@@ -829,43 +809,23 @@ struct NamedPropertyHandlerConfiguration {
829
809
  NamedPropertyDefinerCallback definer, //
830
810
  Local<Value> data = Local<Value>(),
831
811
  PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
832
- : getter(reinterpret_cast<void*>(getter)),
833
- setter(reinterpret_cast<void*>(setter)),
812
+ : getter(getter),
813
+ setter(setter),
834
814
  query(nullptr),
835
- deleter(reinterpret_cast<void*>(deleter)),
815
+ deleter(deleter),
836
816
  enumerator(enumerator),
837
- definer(reinterpret_cast<void*>(definer)),
838
- descriptor(reinterpret_cast<void*>(descriptor)),
839
- data(data),
840
- flags(WithNewSignatureFlag(flags)) {}
841
-
842
- // This variant will be deprecated soon.
843
- NamedPropertyHandlerConfiguration(
844
- GenericNamedPropertyGetterCallback getter,
845
- GenericNamedPropertySetterCallback setter,
846
- GenericNamedPropertyDescriptorCallback descriptor,
847
- GenericNamedPropertyDeleterCallback deleter,
848
- GenericNamedPropertyEnumeratorCallback enumerator,
849
- GenericNamedPropertyDefinerCallback definer,
850
- Local<Value> data = Local<Value>(),
851
- PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
852
- : getter(reinterpret_cast<void*>(getter)),
853
- setter(reinterpret_cast<void*>(setter)),
854
- query(nullptr),
855
- deleter(reinterpret_cast<void*>(deleter)),
856
- enumerator(enumerator),
857
- definer(reinterpret_cast<void*>(definer)),
858
- descriptor(reinterpret_cast<void*>(descriptor)),
817
+ definer(definer),
818
+ descriptor(descriptor),
859
819
  data(data),
860
820
  flags(flags) {}
861
821
 
862
- void* getter; // [Generic]NamedPropertyGetterCallback
863
- void* setter; // [Generic]NamedPropertySetterCallback
864
- void* query; // [Generic]NamedPropertyQueryCallback
865
- void* deleter; // [Generic]NamedPropertyDeleterCallback
822
+ NamedPropertyGetterCallback getter;
823
+ NamedPropertySetterCallback setter;
824
+ NamedPropertyQueryCallback query;
825
+ NamedPropertyDeleterCallback deleter;
866
826
  NamedPropertyEnumeratorCallback enumerator;
867
- void* definer; // [Generic]NamedPropertyDefinerCallback
868
- void* descriptor; // [Generic]NamedPropertyDescriptorCallback
827
+ NamedPropertyDefinerCallback definer;
828
+ NamedPropertyDescriptorCallback descriptor;
869
829
  Local<Value> data;
870
830
  PropertyHandlerFlags flags;
871
831
  };
@@ -891,34 +851,13 @@ struct IndexedPropertyHandlerConfiguration {
891
851
  IndexedPropertyDescriptorCallbackV2 descriptor, //
892
852
  Local<Value> data = Local<Value>(),
893
853
  PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
894
- : getter(reinterpret_cast<void*>(getter)),
895
- setter(reinterpret_cast<void*>(setter)),
896
- query(reinterpret_cast<void*>(query)),
897
- deleter(reinterpret_cast<void*>(deleter)),
854
+ : getter(getter),
855
+ setter(setter),
856
+ query(query),
857
+ deleter(deleter),
898
858
  enumerator(enumerator),
899
- definer(reinterpret_cast<void*>(definer)),
900
- descriptor(reinterpret_cast<void*>(descriptor)),
901
- data(data),
902
- flags(WithNewSignatureFlag(flags)) {}
903
-
904
- // This variant will be deprecated soon.
905
- IndexedPropertyHandlerConfiguration(
906
- IndexedPropertyGetterCallback getter, //
907
- IndexedPropertySetterCallback setter, //
908
- IndexedPropertyQueryCallback query, //
909
- IndexedPropertyDeleterCallback deleter, //
910
- IndexedPropertyEnumeratorCallback enumerator, //
911
- IndexedPropertyDefinerCallback definer, //
912
- IndexedPropertyDescriptorCallback descriptor, //
913
- Local<Value> data = Local<Value>(),
914
- PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
915
- : getter(reinterpret_cast<void*>(getter)),
916
- setter(reinterpret_cast<void*>(setter)),
917
- query(reinterpret_cast<void*>(query)),
918
- deleter(reinterpret_cast<void*>(deleter)),
919
- enumerator(enumerator),
920
- definer(reinterpret_cast<void*>(definer)),
921
- descriptor(reinterpret_cast<void*>(descriptor)),
859
+ definer(definer),
860
+ descriptor(descriptor),
922
861
  data(data),
923
862
  flags(flags) {}
924
863
 
@@ -930,29 +869,10 @@ struct IndexedPropertyHandlerConfiguration {
930
869
  IndexedPropertyEnumeratorCallback enumerator = nullptr,
931
870
  Local<Value> data = Local<Value>(),
932
871
  PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
933
- : getter(reinterpret_cast<void*>(getter)),
934
- setter(reinterpret_cast<void*>(setter)),
935
- query(reinterpret_cast<void*>(query)),
936
- deleter(reinterpret_cast<void*>(deleter)),
937
- enumerator(enumerator),
938
- definer(nullptr),
939
- descriptor(nullptr),
940
- data(data),
941
- flags(WithNewSignatureFlag(flags)) {}
942
-
943
- // This variant will be deprecated soon.
944
- explicit IndexedPropertyHandlerConfiguration(
945
- IndexedPropertyGetterCallback getter,
946
- IndexedPropertySetterCallback setter = nullptr,
947
- IndexedPropertyQueryCallback query = nullptr,
948
- IndexedPropertyDeleterCallback deleter = nullptr,
949
- IndexedPropertyEnumeratorCallback enumerator = nullptr,
950
- Local<Value> data = Local<Value>(),
951
- PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
952
- : getter(reinterpret_cast<void*>(getter)),
953
- setter(reinterpret_cast<void*>(setter)),
954
- query(reinterpret_cast<void*>(query)),
955
- deleter(reinterpret_cast<void*>(deleter)),
872
+ : getter(getter),
873
+ setter(setter),
874
+ query(query),
875
+ deleter(deleter),
956
876
  enumerator(enumerator),
957
877
  definer(nullptr),
958
878
  descriptor(nullptr),
@@ -968,43 +888,23 @@ struct IndexedPropertyHandlerConfiguration {
968
888
  IndexedPropertyDefinerCallbackV2 definer,
969
889
  Local<Value> data = Local<Value>(),
970
890
  PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
971
- : getter(reinterpret_cast<void*>(getter)),
972
- setter(reinterpret_cast<void*>(setter)),
891
+ : getter(getter),
892
+ setter(setter),
973
893
  query(nullptr),
974
- deleter(reinterpret_cast<void*>(deleter)),
894
+ deleter(deleter),
975
895
  enumerator(enumerator),
976
- definer(reinterpret_cast<void*>(definer)),
977
- descriptor(reinterpret_cast<void*>(descriptor)),
978
- data(data),
979
- flags(WithNewSignatureFlag(flags)) {}
980
-
981
- // This variant will be deprecated soon.
982
- IndexedPropertyHandlerConfiguration(
983
- IndexedPropertyGetterCallback getter,
984
- IndexedPropertySetterCallback setter,
985
- IndexedPropertyDescriptorCallback descriptor,
986
- IndexedPropertyDeleterCallback deleter,
987
- IndexedPropertyEnumeratorCallback enumerator,
988
- IndexedPropertyDefinerCallback definer,
989
- Local<Value> data = Local<Value>(),
990
- PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
991
- : getter(reinterpret_cast<void*>(getter)),
992
- setter(reinterpret_cast<void*>(setter)),
993
- query(nullptr),
994
- deleter(reinterpret_cast<void*>(deleter)),
995
- enumerator(enumerator),
996
- definer(reinterpret_cast<void*>(definer)),
997
- descriptor(reinterpret_cast<void*>(descriptor)),
896
+ definer(definer),
897
+ descriptor(descriptor),
998
898
  data(data),
999
899
  flags(flags) {}
1000
900
 
1001
- void* getter; // IndexedPropertyGetterCallback[V2]
1002
- void* setter; // IndexedPropertySetterCallback[V2]
1003
- void* query; // IndexedPropertyQueryCallback[V2]
1004
- void* deleter; // IndexedPropertyDeleterCallback[V2]
901
+ IndexedPropertyGetterCallbackV2 getter;
902
+ IndexedPropertySetterCallbackV2 setter;
903
+ IndexedPropertyQueryCallbackV2 query;
904
+ IndexedPropertyDeleterCallbackV2 deleter;
1005
905
  IndexedPropertyEnumeratorCallback enumerator;
1006
- void* definer; // IndexedPropertyDefinerCallback[V2]
1007
- void* descriptor; // IndexedPropertyDescriptorCallback[V2]
906
+ IndexedPropertyDefinerCallbackV2 definer;
907
+ IndexedPropertyDescriptorCallbackV2 descriptor;
1008
908
  Local<Value> data;
1009
909
  PropertyHandlerFlags flags;
1010
910
  };
@@ -1029,36 +929,6 @@ class V8_EXPORT ObjectTemplate : public Template {
1029
929
  */
1030
930
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
1031
931
 
1032
- /**
1033
- * Sets an accessor on the object template.
1034
- *
1035
- * Whenever the property with the given name is accessed on objects
1036
- * created from this ObjectTemplate the getter and setter callbacks
1037
- * are called instead of getting and setting the property directly
1038
- * on the JavaScript object.
1039
- *
1040
- * \param name The name of the property for which an accessor is added.
1041
- * \param getter The callback to invoke when getting the property.
1042
- * \param setter The callback to invoke when setting the property.
1043
- * \param data A piece of data that will be passed to the getter and setter
1044
- * callbacks whenever they are invoked.
1045
- * \param attribute The attributes of the property for which an accessor
1046
- * is added.
1047
- */
1048
- V8_DEPRECATE_SOON("Use SetAccessor with Local<Name> instead")
1049
- void SetAccessor(
1050
- Local<String> name, AccessorGetterCallback getter,
1051
- AccessorSetterCallback setter = nullptr,
1052
- Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
1053
- SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
1054
- SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
1055
- void SetAccessor(
1056
- Local<Name> name, AccessorNameGetterCallback getter,
1057
- AccessorNameSetterCallback setter = nullptr,
1058
- Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
1059
- SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect,
1060
- SideEffectType setter_side_effect_type = SideEffectType::kHasSideEffect);
1061
-
1062
932
  /**
1063
933
  * Sets a named property handler on the object template.
1064
934
  *
@@ -1072,34 +942,6 @@ class V8_EXPORT ObjectTemplate : public Template {
1072
942
  */
1073
943
  void SetHandler(const NamedPropertyHandlerConfiguration& configuration);
1074
944
 
1075
- /**
1076
- * Sets an indexed property handler on the object template.
1077
- *
1078
- * Whenever an indexed property is accessed on objects created from
1079
- * this object template, the provided callback is invoked instead of
1080
- * accessing the property directly on the JavaScript object.
1081
- *
1082
- * \param getter The callback to invoke when getting a property.
1083
- * \param setter The callback to invoke when setting a property.
1084
- * \param query The callback to invoke to check if an object has a property.
1085
- * \param deleter The callback to invoke when deleting a property.
1086
- * \param enumerator The callback to invoke to enumerate all the indexed
1087
- * properties of an object.
1088
- * \param data A piece of data that will be passed to the callbacks
1089
- * whenever they are invoked.
1090
- */
1091
- V8_DEPRECATE_SOON("Use SetHandler instead")
1092
- void SetIndexedPropertyHandler(
1093
- IndexedPropertyGetterCallback getter,
1094
- IndexedPropertySetterCallback setter = nullptr,
1095
- IndexedPropertyQueryCallback query = nullptr,
1096
- IndexedPropertyDeleterCallback deleter = nullptr,
1097
- IndexedPropertyEnumeratorCallback enumerator = nullptr,
1098
- Local<Value> data = Local<Value>()) {
1099
- SetHandler(IndexedPropertyHandlerConfiguration(getter, setter, query,
1100
- deleter, enumerator, data));
1101
- }
1102
-
1103
945
  /**
1104
946
  * Sets an indexed property handler on the object template.
1105
947
  *
@@ -62,11 +62,11 @@ class TracedReferenceBase : public api_internal::IndirectHandleBase {
62
62
  V8_INLINE void Reset();
63
63
 
64
64
  /**
65
- * Construct a Local<Value> from this handle.
65
+ * Construct a Local<Data> from this handle.
66
66
  */
67
- V8_INLINE Local<Value> Get(Isolate* isolate) const {
68
- if (IsEmpty()) return Local<Value>();
69
- return Local<Value>::New(isolate, this->value<Value>());
67
+ V8_INLINE Local<Data> Get(Isolate* isolate) const {
68
+ if (IsEmpty()) return Local<Data>();
69
+ return Local<Data>::New(isolate, this->value<Data>());
70
70
  }
71
71
 
72
72
  /**
@@ -135,17 +135,6 @@ class BasicTracedReference : public TracedReferenceBase {
135
135
  const_cast<BasicTracedReference<T>&>(*this));
136
136
  }
137
137
 
138
- V8_DEPRECATE_SOON("Use Get to convert to Local instead")
139
- V8_INLINE T* operator->() const {
140
- #ifdef V8_ENABLE_CHECKS
141
- CheckValue();
142
- #endif // V8_ENABLE_CHECKS
143
- return this->template value<T>();
144
- }
145
-
146
- V8_DEPRECATE_SOON("Use Get to convert to Local instead")
147
- V8_INLINE T* operator*() const { return this->operator->(); }
148
-
149
138
  private:
150
139
  /**
151
140
  * An empty BasicTracedReference without storage cell.
@@ -42,7 +42,8 @@ enum StateTag : uint16_t {
42
42
  OTHER,
43
43
  EXTERNAL,
44
44
  ATOMICS_WAIT,
45
- IDLE
45
+ IDLE,
46
+ LOGGING,
46
47
  };
47
48
 
48
49
  // The output structure filled up by GetStackSample API function.