libv8-node 17.9.1.1-aarch64-linux → 18.8.0.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/libv8-node/location.rb +1 -1
- data/lib/libv8/node/version.rb +3 -3
- data/vendor/v8/aarch64-linux/libv8/obj/libv8_monolith.a +0 -0
- data/vendor/v8/include/cppgc/allocation.h +88 -17
- data/vendor/v8/include/cppgc/default-platform.h +2 -10
- data/vendor/v8/include/cppgc/explicit-management.h +22 -4
- data/vendor/v8/include/cppgc/garbage-collected.h +15 -26
- data/vendor/v8/include/cppgc/heap-consistency.h +13 -0
- data/vendor/v8/include/cppgc/heap-state.h +12 -0
- data/vendor/v8/include/cppgc/heap.h +7 -2
- data/vendor/v8/include/cppgc/internal/api-constants.h +8 -0
- data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +23 -12
- data/vendor/v8/include/cppgc/internal/finalizer-trait.h +2 -1
- data/vendor/v8/include/cppgc/internal/logging.h +3 -3
- data/vendor/v8/include/cppgc/internal/persistent-node.h +39 -27
- data/vendor/v8/include/cppgc/internal/pointer-policies.h +4 -4
- data/vendor/v8/include/cppgc/internal/write-barrier.h +26 -32
- data/vendor/v8/include/cppgc/member.h +5 -2
- data/vendor/v8/include/cppgc/persistent.h +30 -31
- data/vendor/v8/include/cppgc/platform.h +3 -1
- data/vendor/v8/include/cppgc/prefinalizer.h +34 -11
- data/vendor/v8/include/cppgc/testing.h +9 -2
- data/vendor/v8/include/cppgc/type-traits.h +6 -13
- data/vendor/v8/include/libplatform/libplatform.h +0 -11
- data/vendor/v8/include/libplatform/v8-tracing.h +0 -1
- data/vendor/v8/include/v8-array-buffer.h +14 -2
- data/vendor/v8/include/v8-callbacks.h +26 -6
- data/vendor/v8/include/v8-context.h +3 -14
- data/vendor/v8/include/v8-cppgc.h +16 -126
- data/vendor/v8/include/v8-data.h +15 -0
- data/vendor/v8/include/v8-debug.h +21 -4
- data/vendor/v8/include/v8-embedder-heap.h +10 -30
- data/vendor/v8/include/v8-embedder-state-scope.h +51 -0
- data/vendor/v8/include/v8-exception.h +0 -7
- data/vendor/v8/include/v8-fast-api-calls.h +82 -31
- data/vendor/v8/include/v8-function.h +3 -0
- data/vendor/v8/include/v8-initialization.h +64 -31
- data/vendor/v8/include/v8-inspector.h +45 -4
- data/vendor/v8/include/v8-internal.h +189 -102
- data/vendor/v8/include/v8-isolate.h +49 -2
- data/vendor/v8/include/v8-local-handle.h +0 -4
- data/vendor/v8/include/v8-locker.h +2 -1
- data/vendor/v8/include/v8-message.h +19 -44
- data/vendor/v8/include/v8-metrics.h +32 -15
- data/vendor/v8/include/v8-object.h +11 -6
- data/vendor/v8/include/v8-platform.h +365 -6
- data/vendor/v8/include/v8-primitive.h +14 -6
- data/vendor/v8/include/v8-profiler.h +78 -2
- data/vendor/v8/include/v8-script.h +27 -51
- data/vendor/v8/include/v8-snapshot.h +0 -2
- data/vendor/v8/include/v8-statistics.h +2 -0
- data/vendor/v8/include/v8-template.h +31 -4
- data/vendor/v8/include/v8-traced-handle.h +39 -224
- data/vendor/v8/include/v8-unwinder.h +10 -7
- data/vendor/v8/include/v8-value-serializer-version.h +1 -1
- data/vendor/v8/include/v8-value-serializer.h +32 -2
- data/vendor/v8/include/v8-version.h +4 -4
- data/vendor/v8/include/v8-wasm.h +13 -1
- data/vendor/v8/include/v8-weak-callback-info.h +20 -6
- data/vendor/v8/include/v8.h +0 -1
- data/vendor/v8/include/v8config.h +56 -11
- metadata +6 -6
- data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +0 -30
@@ -10,7 +10,6 @@
|
|
10
10
|
|
11
11
|
#include <memory>
|
12
12
|
#include <utility>
|
13
|
-
#include <vector>
|
14
13
|
|
15
14
|
#include "cppgc/common.h"
|
16
15
|
#include "v8-array-buffer.h" // NOLINT(build/include_directory)
|
@@ -225,6 +224,7 @@ class V8_EXPORT Isolate {
|
|
225
224
|
|
226
225
|
/**
|
227
226
|
* Explicitly specify a startup snapshot blob. The embedder owns the blob.
|
227
|
+
* The embedder *must* ensure that the snapshot is from a trusted source.
|
228
228
|
*/
|
229
229
|
StartupData* snapshot_blob = nullptr;
|
230
230
|
|
@@ -281,6 +281,18 @@ class V8_EXPORT Isolate {
|
|
281
281
|
*/
|
282
282
|
int embedder_wrapper_type_index = -1;
|
283
283
|
int embedder_wrapper_object_index = -1;
|
284
|
+
|
285
|
+
/**
|
286
|
+
* Callbacks to invoke in case of fatal or OOM errors.
|
287
|
+
*/
|
288
|
+
FatalErrorCallback fatal_error_callback = nullptr;
|
289
|
+
OOMErrorCallback oom_error_callback = nullptr;
|
290
|
+
|
291
|
+
/**
|
292
|
+
* The following parameter is experimental and may change significantly.
|
293
|
+
* This is currently for internal testing.
|
294
|
+
*/
|
295
|
+
Isolate* experimental_attach_to_shared_isolate = nullptr;
|
284
296
|
};
|
285
297
|
|
286
298
|
/**
|
@@ -517,6 +529,8 @@ class V8_EXPORT Isolate {
|
|
517
529
|
kWasmMultiValue = 110,
|
518
530
|
kWasmExceptionHandling = 111,
|
519
531
|
kInvalidatedMegaDOMProtector = 112,
|
532
|
+
kFunctionPrototypeArguments = 113,
|
533
|
+
kFunctionPrototypeCaller = 114,
|
520
534
|
|
521
535
|
// If you add new values here, you'll also need to update Chromium's:
|
522
536
|
// web_feature.mojom, use_counter_callback.cc, and enums.xml. V8 changes to
|
@@ -585,6 +599,11 @@ class V8_EXPORT Isolate {
|
|
585
599
|
*/
|
586
600
|
static Isolate* TryGetCurrent();
|
587
601
|
|
602
|
+
/**
|
603
|
+
* Return true if this isolate is currently active.
|
604
|
+
**/
|
605
|
+
bool IsCurrent() const;
|
606
|
+
|
588
607
|
/**
|
589
608
|
* Clears the set of objects held strongly by the heap. This set of
|
590
609
|
* objects are originally built when a WeakRef is created or
|
@@ -617,8 +636,11 @@ class V8_EXPORT Isolate {
|
|
617
636
|
* This specifies the callback called by the upcoming dynamic
|
618
637
|
* import() language feature to load modules.
|
619
638
|
*/
|
639
|
+
V8_DEPRECATED("Use HostImportModuleDynamicallyCallback")
|
620
640
|
void SetHostImportModuleDynamicallyCallback(
|
621
641
|
HostImportModuleDynamicallyWithImportAssertionsCallback callback);
|
642
|
+
void SetHostImportModuleDynamicallyCallback(
|
643
|
+
HostImportModuleDynamicallyCallback callback);
|
622
644
|
|
623
645
|
/**
|
624
646
|
* This specifies the callback called by the upcoming import.meta
|
@@ -627,6 +649,13 @@ class V8_EXPORT Isolate {
|
|
627
649
|
void SetHostInitializeImportMetaObjectCallback(
|
628
650
|
HostInitializeImportMetaObjectCallback callback);
|
629
651
|
|
652
|
+
/**
|
653
|
+
* This specifies the callback called by the upcoming ShadowRealm
|
654
|
+
* construction language feature to retrieve host created globals.
|
655
|
+
*/
|
656
|
+
void SetHostCreateShadowRealmContextCallback(
|
657
|
+
HostCreateShadowRealmContextCallback callback);
|
658
|
+
|
630
659
|
/**
|
631
660
|
* This specifies the callback called when the stack property of Error
|
632
661
|
* is accessed.
|
@@ -900,11 +929,13 @@ class V8_EXPORT Isolate {
|
|
900
929
|
|
901
930
|
/**
|
902
931
|
* Sets the embedder heap tracer for the isolate.
|
932
|
+
* SetEmbedderHeapTracer cannot be used simultaneously with AttachCppHeap.
|
903
933
|
*/
|
904
934
|
void SetEmbedderHeapTracer(EmbedderHeapTracer* tracer);
|
905
935
|
|
906
936
|
/*
|
907
|
-
* Gets the currently active heap tracer for the isolate
|
937
|
+
* Gets the currently active heap tracer for the isolate that was set with
|
938
|
+
* SetEmbedderHeapTracer.
|
908
939
|
*/
|
909
940
|
EmbedderHeapTracer* GetEmbedderHeapTracer();
|
910
941
|
|
@@ -924,6 +955,7 @@ class V8_EXPORT Isolate {
|
|
924
955
|
* Attaches a managed C++ heap as an extension to the JavaScript heap. The
|
925
956
|
* embedder maintains ownership of the CppHeap. At most one C++ heap can be
|
926
957
|
* attached to V8.
|
958
|
+
* AttachCppHeap cannot be used simultaneously with SetEmbedderHeapTracer.
|
927
959
|
*
|
928
960
|
* This is an experimental feature and may still change significantly.
|
929
961
|
*/
|
@@ -1120,6 +1152,21 @@ class V8_EXPORT Isolate {
|
|
1120
1152
|
*/
|
1121
1153
|
void RequestGarbageCollectionForTesting(GarbageCollectionType type);
|
1122
1154
|
|
1155
|
+
/**
|
1156
|
+
* Request garbage collection with a specific embedderstack state in this
|
1157
|
+
* Isolate. It is only valid to call this function if --expose_gc was
|
1158
|
+
* specified.
|
1159
|
+
*
|
1160
|
+
* This should only be used for testing purposes and not to enforce a garbage
|
1161
|
+
* collection schedule. It has strong negative impact on the garbage
|
1162
|
+
* collection performance. Use IdleNotificationDeadline() or
|
1163
|
+
* LowMemoryNotification() instead to influence the garbage collection
|
1164
|
+
* schedule.
|
1165
|
+
*/
|
1166
|
+
void RequestGarbageCollectionForTesting(
|
1167
|
+
GarbageCollectionType type,
|
1168
|
+
EmbedderHeapTracer::EmbedderStackState stack_state);
|
1169
|
+
|
1123
1170
|
/**
|
1124
1171
|
* Set the callback to invoke for logging event.
|
1125
1172
|
*/
|
@@ -46,8 +46,6 @@ class String;
|
|
46
46
|
template <class F>
|
47
47
|
class Traced;
|
48
48
|
template <class F>
|
49
|
-
class TracedGlobal;
|
50
|
-
template <class F>
|
51
49
|
class TracedReference;
|
52
50
|
class TracedReferenceBase;
|
53
51
|
class Utils;
|
@@ -312,8 +310,6 @@ class Local {
|
|
312
310
|
template <class F>
|
313
311
|
friend class Traced;
|
314
312
|
template <class F>
|
315
|
-
friend class TracedGlobal;
|
316
|
-
template <class F>
|
317
313
|
friend class BasicTracedReference;
|
318
314
|
template <class F>
|
319
315
|
friend class TracedReference;
|
@@ -127,8 +127,9 @@ class V8_EXPORT Locker {
|
|
127
127
|
* The current implementation is quite confusing and leads to unexpected
|
128
128
|
* results if anybody uses v8::Locker in the current process.
|
129
129
|
*/
|
130
|
+
V8_DEPRECATE_SOON("This method will be removed.")
|
130
131
|
static bool WasEverUsed();
|
131
|
-
|
132
|
+
V8_DEPRECATED("Use WasEverUsed instead")
|
132
133
|
static bool IsActive();
|
133
134
|
|
134
135
|
// Disallow copying and assigning.
|
@@ -11,6 +11,7 @@
|
|
11
11
|
|
12
12
|
#include "v8-local-handle.h" // NOLINT(build/include_directory)
|
13
13
|
#include "v8-maybe.h" // NOLINT(build/include_directory)
|
14
|
+
#include "v8-primitive.h" // NOLINT(build/include_directory)
|
14
15
|
#include "v8config.h" // NOLINT(build/include_directory)
|
15
16
|
|
16
17
|
namespace v8 {
|
@@ -60,38 +61,15 @@ class ScriptOriginOptions {
|
|
60
61
|
*/
|
61
62
|
class V8_EXPORT ScriptOrigin {
|
62
63
|
public:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
Local<Boolean> resource_is_opaque = Local<Boolean>(),
|
73
|
-
Local<Boolean> is_wasm = Local<Boolean>(),
|
74
|
-
Local<Boolean> is_module = Local<Boolean>(),
|
75
|
-
Local<PrimitiveArray> host_defined_options = Local<PrimitiveArray>());
|
76
|
-
#if defined(_MSC_VER) && _MSC_VER >= 1910 /* Disable on VS2015 */
|
77
|
-
V8_DEPRECATE_SOON("Use constructor that takes an isolate")
|
78
|
-
#endif
|
79
|
-
explicit ScriptOrigin(
|
80
|
-
Local<Value> resource_name, int resource_line_offset = 0,
|
81
|
-
int resource_column_offset = 0,
|
82
|
-
bool resource_is_shared_cross_origin = false, int script_id = -1,
|
83
|
-
Local<Value> source_map_url = Local<Value>(),
|
84
|
-
bool resource_is_opaque = false, bool is_wasm = false,
|
85
|
-
bool is_module = false,
|
86
|
-
Local<PrimitiveArray> host_defined_options = Local<PrimitiveArray>());
|
87
|
-
V8_INLINE ScriptOrigin(
|
88
|
-
Isolate* isolate, Local<Value> resource_name,
|
89
|
-
int resource_line_offset = 0, int resource_column_offset = 0,
|
90
|
-
bool resource_is_shared_cross_origin = false, int script_id = -1,
|
91
|
-
Local<Value> source_map_url = Local<Value>(),
|
92
|
-
bool resource_is_opaque = false, bool is_wasm = false,
|
93
|
-
bool is_module = false,
|
94
|
-
Local<PrimitiveArray> host_defined_options = Local<PrimitiveArray>())
|
64
|
+
V8_INLINE ScriptOrigin(Isolate* isolate, Local<Value> resource_name,
|
65
|
+
int resource_line_offset = 0,
|
66
|
+
int resource_column_offset = 0,
|
67
|
+
bool resource_is_shared_cross_origin = false,
|
68
|
+
int script_id = -1,
|
69
|
+
Local<Value> source_map_url = Local<Value>(),
|
70
|
+
bool resource_is_opaque = false, bool is_wasm = false,
|
71
|
+
bool is_module = false,
|
72
|
+
Local<Data> host_defined_options = Local<Data>())
|
95
73
|
: isolate_(isolate),
|
96
74
|
resource_name_(resource_name),
|
97
75
|
resource_line_offset_(resource_line_offset),
|
@@ -100,23 +78,22 @@ class V8_EXPORT ScriptOrigin {
|
|
100
78
|
is_module),
|
101
79
|
script_id_(script_id),
|
102
80
|
source_map_url_(source_map_url),
|
103
|
-
host_defined_options_(host_defined_options) {
|
81
|
+
host_defined_options_(host_defined_options) {
|
82
|
+
VerifyHostDefinedOptions();
|
83
|
+
}
|
104
84
|
|
105
85
|
V8_INLINE Local<Value> ResourceName() const;
|
106
|
-
V8_DEPRECATE_SOON("Use getter with primitive C++ types.")
|
107
|
-
V8_INLINE Local<Integer> ResourceLineOffset() const;
|
108
|
-
V8_DEPRECATE_SOON("Use getter with primitive C++ types.")
|
109
|
-
V8_INLINE Local<Integer> ResourceColumnOffset() const;
|
110
|
-
V8_DEPRECATE_SOON("Use getter with primitive C++ types.")
|
111
|
-
V8_INLINE Local<Integer> ScriptID() const;
|
112
86
|
V8_INLINE int LineOffset() const;
|
113
87
|
V8_INLINE int ColumnOffset() const;
|
114
88
|
V8_INLINE int ScriptId() const;
|
115
89
|
V8_INLINE Local<Value> SourceMapUrl() const;
|
116
|
-
|
90
|
+
V8_DEPRECATE_SOON("Use GetHostDefinedOptions")
|
91
|
+
Local<PrimitiveArray> HostDefinedOptions() const;
|
92
|
+
V8_INLINE Local<Data> GetHostDefinedOptions() const;
|
117
93
|
V8_INLINE ScriptOriginOptions Options() const { return options_; }
|
118
94
|
|
119
95
|
private:
|
96
|
+
void VerifyHostDefinedOptions() const;
|
120
97
|
Isolate* isolate_;
|
121
98
|
Local<Value> resource_name_;
|
122
99
|
int resource_line_offset_;
|
@@ -124,7 +101,7 @@ class V8_EXPORT ScriptOrigin {
|
|
124
101
|
ScriptOriginOptions options_;
|
125
102
|
int script_id_;
|
126
103
|
Local<Value> source_map_url_;
|
127
|
-
Local<
|
104
|
+
Local<Data> host_defined_options_;
|
128
105
|
};
|
129
106
|
|
130
107
|
/**
|
@@ -212,8 +189,6 @@ class V8_EXPORT Message {
|
|
212
189
|
bool IsSharedCrossOrigin() const;
|
213
190
|
bool IsOpaque() const;
|
214
191
|
|
215
|
-
V8_DEPRECATE_SOON("Use the version that takes a std::ostream&.")
|
216
|
-
static void PrintCurrentStackTrace(Isolate* isolate, FILE* out);
|
217
192
|
static void PrintCurrentStackTrace(Isolate* isolate, std::ostream& out);
|
218
193
|
|
219
194
|
static const int kNoLineNumberInfo = 0;
|
@@ -224,7 +199,7 @@ class V8_EXPORT Message {
|
|
224
199
|
|
225
200
|
Local<Value> ScriptOrigin::ResourceName() const { return resource_name_; }
|
226
201
|
|
227
|
-
Local<
|
202
|
+
Local<Data> ScriptOrigin::GetHostDefinedOptions() const {
|
228
203
|
return host_defined_options_;
|
229
204
|
}
|
230
205
|
|
@@ -21,6 +21,7 @@ class Isolate;
|
|
21
21
|
namespace metrics {
|
22
22
|
|
23
23
|
struct GarbageCollectionPhases {
|
24
|
+
int64_t total_wall_clock_duration_in_us = -1;
|
24
25
|
int64_t compact_wall_clock_duration_in_us = -1;
|
25
26
|
int64_t mark_wall_clock_duration_in_us = -1;
|
26
27
|
int64_t sweep_wall_clock_duration_in_us = -1;
|
@@ -34,6 +35,7 @@ struct GarbageCollectionSizes {
|
|
34
35
|
};
|
35
36
|
|
36
37
|
struct GarbageCollectionFullCycle {
|
38
|
+
int reason = -1;
|
37
39
|
GarbageCollectionPhases total;
|
38
40
|
GarbageCollectionPhases total_cpp;
|
39
41
|
GarbageCollectionPhases main_thread;
|
@@ -46,12 +48,12 @@ struct GarbageCollectionFullCycle {
|
|
46
48
|
GarbageCollectionSizes objects_cpp;
|
47
49
|
GarbageCollectionSizes memory;
|
48
50
|
GarbageCollectionSizes memory_cpp;
|
49
|
-
double collection_rate_in_percent;
|
50
|
-
double collection_rate_cpp_in_percent;
|
51
|
-
double efficiency_in_bytes_per_us;
|
52
|
-
double efficiency_cpp_in_bytes_per_us;
|
53
|
-
double main_thread_efficiency_in_bytes_per_us;
|
54
|
-
double main_thread_efficiency_cpp_in_bytes_per_us;
|
51
|
+
double collection_rate_in_percent = -1.0;
|
52
|
+
double collection_rate_cpp_in_percent = -1.0;
|
53
|
+
double efficiency_in_bytes_per_us = -1.0;
|
54
|
+
double efficiency_cpp_in_bytes_per_us = -1.0;
|
55
|
+
double main_thread_efficiency_in_bytes_per_us = -1.0;
|
56
|
+
double main_thread_efficiency_cpp_in_bytes_per_us = -1.0;
|
55
57
|
};
|
56
58
|
|
57
59
|
struct GarbageCollectionFullMainThreadIncrementalMark {
|
@@ -59,25 +61,38 @@ struct GarbageCollectionFullMainThreadIncrementalMark {
|
|
59
61
|
int64_t cpp_wall_clock_duration_in_us = -1;
|
60
62
|
};
|
61
63
|
|
62
|
-
struct GarbageCollectionFullMainThreadBatchedIncrementalMark {
|
63
|
-
std::vector<GarbageCollectionFullMainThreadIncrementalMark> events;
|
64
|
-
};
|
65
|
-
|
66
64
|
struct GarbageCollectionFullMainThreadIncrementalSweep {
|
67
65
|
int64_t wall_clock_duration_in_us = -1;
|
68
66
|
int64_t cpp_wall_clock_duration_in_us = -1;
|
69
67
|
};
|
70
68
|
|
71
|
-
|
72
|
-
|
69
|
+
template <typename EventType>
|
70
|
+
struct GarbageCollectionBatchedEvents {
|
71
|
+
std::vector<EventType> events;
|
73
72
|
};
|
74
73
|
|
74
|
+
using GarbageCollectionFullMainThreadBatchedIncrementalMark =
|
75
|
+
GarbageCollectionBatchedEvents<
|
76
|
+
GarbageCollectionFullMainThreadIncrementalMark>;
|
77
|
+
using GarbageCollectionFullMainThreadBatchedIncrementalSweep =
|
78
|
+
GarbageCollectionBatchedEvents<
|
79
|
+
GarbageCollectionFullMainThreadIncrementalSweep>;
|
80
|
+
|
75
81
|
struct GarbageCollectionYoungCycle {
|
82
|
+
int reason = -1;
|
76
83
|
int64_t total_wall_clock_duration_in_us = -1;
|
77
84
|
int64_t main_thread_wall_clock_duration_in_us = -1;
|
78
|
-
double collection_rate_in_percent;
|
79
|
-
double efficiency_in_bytes_per_us;
|
80
|
-
double main_thread_efficiency_in_bytes_per_us;
|
85
|
+
double collection_rate_in_percent = -1.0;
|
86
|
+
double efficiency_in_bytes_per_us = -1.0;
|
87
|
+
double main_thread_efficiency_in_bytes_per_us = -1.0;
|
88
|
+
#if defined(CPPGC_YOUNG_GENERATION)
|
89
|
+
GarbageCollectionPhases total_cpp;
|
90
|
+
GarbageCollectionSizes objects_cpp;
|
91
|
+
GarbageCollectionSizes memory_cpp;
|
92
|
+
double collection_rate_cpp_in_percent = -1.0;
|
93
|
+
double efficiency_cpp_in_bytes_per_us = -1.0;
|
94
|
+
double main_thread_efficiency_cpp_in_bytes_per_us = -1.0;
|
95
|
+
#endif // defined(CPPGC_YOUNG_GENERATION)
|
81
96
|
};
|
82
97
|
|
83
98
|
struct WasmModuleDecoded {
|
@@ -230,6 +245,8 @@ struct V8_EXPORT LongTaskStats {
|
|
230
245
|
int64_t gc_full_atomic_wall_clock_duration_us = 0;
|
231
246
|
int64_t gc_full_incremental_wall_clock_duration_us = 0;
|
232
247
|
int64_t gc_young_wall_clock_duration_us = 0;
|
248
|
+
// Only collected with --slow-histograms
|
249
|
+
int64_t v8_execute_us = 0;
|
233
250
|
};
|
234
251
|
|
235
252
|
} // namespace metrics
|
@@ -493,7 +493,7 @@ class V8_EXPORT Object : public Value {
|
|
493
493
|
return object.val_->GetAlignedPointerFromInternalField(index);
|
494
494
|
}
|
495
495
|
|
496
|
-
/** Same as above, but works for
|
496
|
+
/** Same as above, but works for TracedReference. */
|
497
497
|
V8_INLINE static void* GetAlignedPointerFromInternalField(
|
498
498
|
const BasicTracedReference<Object>& object, int index) {
|
499
499
|
return object->GetAlignedPointerFromInternalField(index);
|
@@ -594,12 +594,17 @@ class V8_EXPORT Object : public Value {
|
|
594
594
|
/**
|
595
595
|
* Returns the context in which the object was created.
|
596
596
|
*/
|
597
|
-
|
597
|
+
V8_DEPRECATED("Use MaybeLocal<Context> GetCreationContext()")
|
598
598
|
Local<Context> CreationContext();
|
599
599
|
MaybeLocal<Context> GetCreationContext();
|
600
600
|
|
601
|
+
/**
|
602
|
+
* Shortcut for GetCreationContext().ToLocalChecked().
|
603
|
+
**/
|
604
|
+
Local<Context> GetCreationContextChecked();
|
605
|
+
|
601
606
|
/** Same as above, but works for Persistents */
|
602
|
-
|
607
|
+
V8_DEPRECATED(
|
603
608
|
"Use MaybeLocal<Context> GetCreationContext(const "
|
604
609
|
"PersistentBase<Object>& object)")
|
605
610
|
static Local<Context> CreationContext(const PersistentBase<Object>& object);
|
@@ -730,7 +735,7 @@ Local<Value> Object::GetInternalField(int index) {
|
|
730
735
|
}
|
731
736
|
|
732
737
|
void* Object::GetAlignedPointerFromInternalField(int index) {
|
733
|
-
#
|
738
|
+
#if !defined(V8_ENABLE_CHECKS)
|
734
739
|
using A = internal::Address;
|
735
740
|
using I = internal::Internals;
|
736
741
|
A obj = *reinterpret_cast<A*>(this);
|
@@ -739,10 +744,10 @@ void* Object::GetAlignedPointerFromInternalField(int index) {
|
|
739
744
|
auto instance_type = I::GetInstanceType(obj);
|
740
745
|
if (v8::internal::CanHaveInternalField(instance_type)) {
|
741
746
|
int offset = I::kJSObjectHeaderSize + (I::kEmbedderDataSlotSize * index);
|
742
|
-
#ifdef
|
747
|
+
#ifdef V8_SANDBOXED_EXTERNAL_POINTERS
|
743
748
|
offset += I::kEmbedderDataSlotRawPayloadOffset;
|
744
749
|
#endif
|
745
|
-
internal::Isolate* isolate = I::
|
750
|
+
internal::Isolate* isolate = I::GetIsolateForSandbox(obj);
|
746
751
|
A value = I::ReadExternalPointerField(
|
747
752
|
isolate, obj, offset, internal::kEmbedderDataSlotPayloadTag);
|
748
753
|
return reinterpret_cast<void*>(value);
|