libv8-node 20.12.1.0-aarch64-linux-musl → 22.5.1.0-aarch64-linux-musl
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libv8/node/version.rb +3 -3
- data/vendor/v8/aarch64-linux-musl/libv8/obj/libv8_monolith.a +0 -0
- data/vendor/v8/include/cppgc/internal/api-constants.h +24 -5
- data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +16 -6
- data/vendor/v8/include/cppgc/internal/caged-heap.h +12 -5
- data/vendor/v8/include/cppgc/internal/gc-info.h +82 -91
- data/vendor/v8/include/cppgc/internal/member-storage.h +16 -8
- data/vendor/v8/include/cppgc/member.h +25 -0
- data/vendor/v8/include/cppgc/persistent.h +4 -0
- data/vendor/v8/include/cppgc/platform.h +6 -1
- data/vendor/v8/include/cppgc/sentinel-pointer.h +7 -0
- data/vendor/v8/include/cppgc/source-location.h +2 -78
- data/vendor/v8/include/cppgc/trace-trait.h +8 -0
- data/vendor/v8/include/cppgc/type-traits.h +25 -4
- data/vendor/v8/include/cppgc/visitor.h +82 -4
- data/vendor/v8/include/libplatform/libplatform.h +7 -1
- data/vendor/v8/include/v8-array-buffer.h +6 -0
- data/vendor/v8/include/v8-callbacks.h +57 -19
- data/vendor/v8/include/v8-container.h +54 -0
- data/vendor/v8/include/v8-context.h +58 -32
- data/vendor/v8/include/v8-embedder-heap.h +31 -3
- data/vendor/v8/include/v8-embedder-state-scope.h +2 -1
- data/vendor/v8/include/v8-exception.h +15 -9
- data/vendor/v8/include/v8-fast-api-calls.h +58 -31
- data/vendor/v8/include/v8-forward.h +1 -0
- data/vendor/v8/include/v8-function-callback.h +135 -30
- data/vendor/v8/include/v8-function.h +6 -0
- data/vendor/v8/include/v8-handle-base.h +137 -0
- data/vendor/v8/include/v8-inspector.h +35 -13
- data/vendor/v8/include/v8-internal.h +510 -71
- data/vendor/v8/include/v8-isolate.h +176 -100
- data/vendor/v8/include/v8-local-handle.h +383 -112
- data/vendor/v8/include/v8-memory-span.h +157 -2
- data/vendor/v8/include/v8-message.h +22 -3
- data/vendor/v8/include/v8-metrics.h +1 -0
- data/vendor/v8/include/v8-object.h +98 -77
- data/vendor/v8/include/v8-persistent-handle.h +68 -90
- data/vendor/v8/include/v8-platform.h +191 -23
- data/vendor/v8/include/v8-primitive.h +12 -8
- data/vendor/v8/include/v8-profiler.h +16 -2
- data/vendor/v8/include/v8-script.h +88 -14
- data/vendor/v8/include/v8-snapshot.h +96 -22
- data/vendor/v8/include/v8-source-location.h +92 -0
- data/vendor/v8/include/v8-statistics.h +31 -10
- data/vendor/v8/include/v8-template.h +410 -131
- data/vendor/v8/include/v8-traced-handle.h +108 -90
- data/vendor/v8/include/v8-typed-array.h +115 -7
- data/vendor/v8/include/v8-unwinder.h +1 -1
- data/vendor/v8/include/v8-util.h +23 -20
- data/vendor/v8/include/v8-value-serializer.h +14 -0
- data/vendor/v8/include/v8-value.h +105 -3
- data/vendor/v8/include/v8-version.h +4 -4
- data/vendor/v8/include/v8config.h +54 -20
- metadata +4 -2
@@ -294,6 +294,12 @@ class V8_EXPORT Isolate {
|
|
294
294
|
*/
|
295
295
|
FatalErrorCallback fatal_error_callback = nullptr;
|
296
296
|
OOMErrorCallback oom_error_callback = nullptr;
|
297
|
+
|
298
|
+
/**
|
299
|
+
* A CppHeap used to construct the Isolate. V8 takes ownership of the
|
300
|
+
* CppHeap passed this way.
|
301
|
+
*/
|
302
|
+
CppHeap* cpp_heap = nullptr;
|
297
303
|
};
|
298
304
|
|
299
305
|
/**
|
@@ -389,16 +395,13 @@ class V8_EXPORT Isolate {
|
|
389
395
|
*/
|
390
396
|
class V8_EXPORT V8_NODISCARD SafeForTerminationScope {
|
391
397
|
public:
|
392
|
-
|
393
|
-
|
398
|
+
V8_DEPRECATE_SOON("All code should be safe for termination")
|
399
|
+
explicit SafeForTerminationScope(v8::Isolate* v8_isolate) {}
|
400
|
+
~SafeForTerminationScope() {}
|
394
401
|
|
395
402
|
// Prevent copying of Scope objects.
|
396
403
|
SafeForTerminationScope(const SafeForTerminationScope&) = delete;
|
397
404
|
SafeForTerminationScope& operator=(const SafeForTerminationScope&) = delete;
|
398
|
-
|
399
|
-
private:
|
400
|
-
internal::Isolate* i_isolate_;
|
401
|
-
bool prev_value_;
|
402
405
|
};
|
403
406
|
|
404
407
|
/**
|
@@ -414,40 +417,43 @@ class V8_EXPORT Isolate {
|
|
414
417
|
* Features reported via the SetUseCounterCallback callback. Do not change
|
415
418
|
* assigned numbers of existing items; add new features to the end of this
|
416
419
|
* list.
|
420
|
+
* Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and
|
421
|
+
* then finally be renamed to `kOBSOLETE_...` to stop embedders from using
|
422
|
+
* them.
|
417
423
|
*/
|
418
424
|
enum UseCounterFeature {
|
419
425
|
kUseAsm = 0,
|
420
426
|
kBreakIterator = 1,
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
427
|
+
kOBSOLETE_LegacyConst = 2,
|
428
|
+
kOBSOLETE_MarkDequeOverflow = 3,
|
429
|
+
kOBSOLETE_StoreBufferOverflow = 4,
|
430
|
+
kOBSOLETE_SlotsBufferOverflow = 5,
|
431
|
+
kOBSOLETE_ObjectObserve = 6,
|
426
432
|
kForcedGC = 7,
|
427
433
|
kSloppyMode = 8,
|
428
434
|
kStrictMode = 9,
|
429
|
-
|
435
|
+
kOBSOLETE_StrongMode = 10,
|
430
436
|
kRegExpPrototypeStickyGetter = 11,
|
431
437
|
kRegExpPrototypeToString = 12,
|
432
438
|
kRegExpPrototypeUnicodeGetter = 13,
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
+
kOBSOLETE_IntlV8Parse = 14,
|
440
|
+
kOBSOLETE_IntlPattern = 15,
|
441
|
+
kOBSOLETE_IntlResolved = 16,
|
442
|
+
kOBSOLETE_PromiseChain = 17,
|
443
|
+
kOBSOLETE_PromiseAccept = 18,
|
444
|
+
kOBSOLETE_PromiseDefer = 19,
|
439
445
|
kHtmlCommentInExternalScript = 20,
|
440
446
|
kHtmlComment = 21,
|
441
447
|
kSloppyModeBlockScopedFunctionRedefinition = 22,
|
442
448
|
kForInInitializer = 23,
|
443
|
-
|
449
|
+
kOBSOLETE_ArrayProtectorDirtied = 24,
|
444
450
|
kArraySpeciesModified = 25,
|
445
451
|
kArrayPrototypeConstructorModified = 26,
|
446
|
-
|
452
|
+
kOBSOLETE_ArrayInstanceProtoModified = 27,
|
447
453
|
kArrayInstanceConstructorModified = 28,
|
448
|
-
|
449
|
-
|
450
|
-
|
454
|
+
kOBSOLETE_LegacyFunctionDeclaration = 29,
|
455
|
+
kOBSOLETE_RegExpPrototypeSourceGetter = 30,
|
456
|
+
kOBSOLETE_RegExpPrototypeOldFlagGetter = 31,
|
451
457
|
kDecimalWithLeadingZeroInStrictMode = 32,
|
452
458
|
kLegacyDateParser = 33,
|
453
459
|
kDefineGetterOrSetterWouldThrow = 34,
|
@@ -455,21 +461,21 @@ class V8_EXPORT Isolate {
|
|
455
461
|
kAssigmentExpressionLHSIsCallInSloppy = 36,
|
456
462
|
kAssigmentExpressionLHSIsCallInStrict = 37,
|
457
463
|
kPromiseConstructorReturnedUndefined = 38,
|
458
|
-
|
459
|
-
|
460
|
-
|
464
|
+
kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39,
|
465
|
+
kOBSOLETE_LabeledExpressionStatement = 40,
|
466
|
+
kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41,
|
461
467
|
kIndexAccessor = 42,
|
462
468
|
kErrorCaptureStackTrace = 43,
|
463
469
|
kErrorPrepareStackTrace = 44,
|
464
470
|
kErrorStackTraceLimit = 45,
|
465
471
|
kWebAssemblyInstantiation = 46,
|
466
472
|
kDeoptimizerDisableSpeculation = 47,
|
467
|
-
|
473
|
+
kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48,
|
468
474
|
kFunctionTokenOffsetTooLongForToString = 49,
|
469
475
|
kWasmSharedMemory = 50,
|
470
476
|
kWasmThreadOpcodes = 51,
|
471
|
-
|
472
|
-
|
477
|
+
kOBSOLETE_AtomicsNotify = 52,
|
478
|
+
kOBSOLETE_AtomicsWake = 53,
|
473
479
|
kCollator = 54,
|
474
480
|
kNumberFormat = 55,
|
475
481
|
kDateTimeFormat = 56,
|
@@ -479,7 +485,7 @@ class V8_EXPORT Isolate {
|
|
479
485
|
kListFormat = 60,
|
480
486
|
kSegmenter = 61,
|
481
487
|
kStringLocaleCompare = 62,
|
482
|
-
|
488
|
+
kOBSOLETE_StringToLocaleUpperCase = 63,
|
483
489
|
kStringToLocaleLowerCase = 64,
|
484
490
|
kNumberToLocaleString = 65,
|
485
491
|
kDateToLocaleString = 66,
|
@@ -487,14 +493,14 @@ class V8_EXPORT Isolate {
|
|
487
493
|
kDateToLocaleTimeString = 68,
|
488
494
|
kAttemptOverrideReadOnlyOnPrototypeSloppy = 69,
|
489
495
|
kAttemptOverrideReadOnlyOnPrototypeStrict = 70,
|
490
|
-
|
496
|
+
kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71,
|
491
497
|
kRegExpMatchIsTrueishOnNonJSRegExp = 72,
|
492
498
|
kRegExpMatchIsFalseishOnJSRegExp = 73,
|
493
|
-
|
499
|
+
kOBSOLETE_DateGetTimezoneOffset = 74,
|
494
500
|
kStringNormalize = 75,
|
495
501
|
kCallSiteAPIGetFunctionSloppyCall = 76,
|
496
502
|
kCallSiteAPIGetThisSloppyCall = 77,
|
497
|
-
|
503
|
+
kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78,
|
498
504
|
kRegExpExecCalledOnSlowRegExp = 79,
|
499
505
|
kRegExpReplaceCalledOnSlowRegExp = 80,
|
500
506
|
kDisplayNames = 81,
|
@@ -525,8 +531,8 @@ class V8_EXPORT Isolate {
|
|
525
531
|
kWasmSimdOpcodes = 106,
|
526
532
|
kVarRedeclaredCatchBinding = 107,
|
527
533
|
kWasmRefTypes = 108,
|
528
|
-
|
529
|
-
|
534
|
+
kOBSOLETE_WasmBulkMemory = 109,
|
535
|
+
kOBSOLETE_WasmMultiValue = 110,
|
530
536
|
kWasmExceptionHandling = 111,
|
531
537
|
kInvalidatedMegaDOMProtector = 112,
|
532
538
|
kFunctionPrototypeArguments = 113,
|
@@ -534,8 +540,29 @@ class V8_EXPORT Isolate {
|
|
534
540
|
kTurboFanOsrCompileStarted = 115,
|
535
541
|
kAsyncStackTaggingCreateTaskCall = 116,
|
536
542
|
kDurationFormat = 117,
|
537
|
-
|
538
|
-
|
543
|
+
kInvalidatedNumberStringNotRegexpLikeProtector = 118,
|
544
|
+
kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119,
|
545
|
+
kImportAssertionDeprecatedSyntax = 120,
|
546
|
+
kLocaleInfoObsoletedGetters = 121,
|
547
|
+
kLocaleInfoFunctions = 122,
|
548
|
+
kCompileHintsMagicAll = 123,
|
549
|
+
kInvalidatedNoProfilingProtector = 124,
|
550
|
+
kWasmMemory64 = 125,
|
551
|
+
kWasmMultiMemory = 126,
|
552
|
+
kWasmGC = 127,
|
553
|
+
kWasmImportedStrings = 128,
|
554
|
+
kSourceMappingUrlMagicCommentAtSign = 129,
|
555
|
+
kTemporalObject = 130,
|
556
|
+
kWasmModuleCompilation = 131,
|
557
|
+
kInvalidatedNoUndetectableObjectsProtector = 132,
|
558
|
+
kWasmJavaScriptPromiseIntegration = 133,
|
559
|
+
kWasmReturnCall = 134,
|
560
|
+
kWasmExtendedConst = 135,
|
561
|
+
kWasmRelaxedSimd = 136,
|
562
|
+
kWasmTypeReflection = 137,
|
563
|
+
kWasmExnRef = 138,
|
564
|
+
kWasmTypedFuncRef = 139,
|
565
|
+
kInvalidatedStringWrapperToPrimitiveProtector = 140,
|
539
566
|
|
540
567
|
// If you add new values here, you'll also need to update Chromium's:
|
541
568
|
// web_feature.mojom, use_counter_callback.cc, and enums.xml. V8 changes to
|
@@ -563,7 +590,7 @@ class V8_EXPORT Isolate {
|
|
563
590
|
* Only Isolate::GetData() and Isolate::SetData(), which access the
|
564
591
|
* embedder-controlled parts of the isolate, are allowed to be called on the
|
565
592
|
* uninitialized isolate. To initialize the isolate, call
|
566
|
-
* Isolate::Initialize()
|
593
|
+
* `Isolate::Initialize()` or initialize a `SnapshotCreator`.
|
567
594
|
*
|
568
595
|
* When an isolate is no longer used its resources should be freed
|
569
596
|
* by calling Dispose(). Using the delete operator is not allowed.
|
@@ -664,6 +691,13 @@ class V8_EXPORT Isolate {
|
|
664
691
|
*/
|
665
692
|
void SetPrepareStackTraceCallback(PrepareStackTraceCallback callback);
|
666
693
|
|
694
|
+
#if defined(V8_OS_WIN)
|
695
|
+
/**
|
696
|
+
* This specifies the callback called when an ETW tracing session starts.
|
697
|
+
*/
|
698
|
+
void SetFilterETWSessionByURLCallback(FilterETWSessionByURLCallback callback);
|
699
|
+
#endif // V8_OS_WIN
|
700
|
+
|
667
701
|
/**
|
668
702
|
* Optional notification that the system is running low on memory.
|
669
703
|
* V8 uses these notifications to guide heuristics.
|
@@ -672,6 +706,14 @@ class V8_EXPORT Isolate {
|
|
672
706
|
*/
|
673
707
|
void MemoryPressureNotification(MemoryPressureLevel level);
|
674
708
|
|
709
|
+
/**
|
710
|
+
* Optional request from the embedder to tune v8 towards energy efficiency
|
711
|
+
* rather than speed if `battery_saver_mode_enabled` is true, because the
|
712
|
+
* embedder is in battery saver mode. If false, the correct tuning is left
|
713
|
+
* to v8 to decide.
|
714
|
+
*/
|
715
|
+
void SetBatterySaverMode(bool battery_saver_mode_enabled);
|
716
|
+
|
675
717
|
/**
|
676
718
|
* Drop non-essential caches. Should only be called from testing code.
|
677
719
|
* The method can potentially block for a long time and does not necessarily
|
@@ -747,6 +789,18 @@ class V8_EXPORT Isolate {
|
|
747
789
|
template <class T>
|
748
790
|
V8_INLINE MaybeLocal<T> GetDataFromSnapshotOnce(size_t index);
|
749
791
|
|
792
|
+
/**
|
793
|
+
* Returns the value that was set or restored by
|
794
|
+
* SetContinuationPreservedEmbedderData(), if any.
|
795
|
+
*/
|
796
|
+
Local<Value> GetContinuationPreservedEmbedderData();
|
797
|
+
|
798
|
+
/**
|
799
|
+
* Sets a value that will be stored on continuations and reset while the
|
800
|
+
* continuation runs.
|
801
|
+
*/
|
802
|
+
void SetContinuationPreservedEmbedderData(Local<Value> data);
|
803
|
+
|
750
804
|
/**
|
751
805
|
* Get statistics about the heap memory usage.
|
752
806
|
*/
|
@@ -904,25 +958,73 @@ class V8_EXPORT Isolate {
|
|
904
958
|
|
905
959
|
/**
|
906
960
|
* Enables the host application to receive a notification before a
|
907
|
-
* garbage collection.
|
908
|
-
*
|
909
|
-
*
|
910
|
-
*
|
911
|
-
*
|
912
|
-
*
|
961
|
+
* garbage collection.
|
962
|
+
*
|
963
|
+
* \param callback The callback to be invoked. The callback is allowed to
|
964
|
+
* allocate but invocation is not re-entrant: a callback triggering
|
965
|
+
* garbage collection will not be called again. JS execution is prohibited
|
966
|
+
* from these callbacks. A single callback may only be registered once.
|
967
|
+
* \param gc_type_filter A filter in case it should be applied.
|
913
968
|
*/
|
914
|
-
void AddGCPrologueCallback(GCCallbackWithData callback, void* data = nullptr,
|
915
|
-
GCType gc_type_filter = kGCTypeAll);
|
916
969
|
void AddGCPrologueCallback(GCCallback callback,
|
917
970
|
GCType gc_type_filter = kGCTypeAll);
|
918
971
|
|
919
972
|
/**
|
920
|
-
*
|
921
|
-
*
|
973
|
+
* \copydoc AddGCPrologueCallback(GCCallback, GCType)
|
974
|
+
*
|
975
|
+
* \param data Additional data that should be passed to the callback.
|
976
|
+
*/
|
977
|
+
void AddGCPrologueCallback(GCCallbackWithData callback, void* data = nullptr,
|
978
|
+
GCType gc_type_filter = kGCTypeAll);
|
979
|
+
|
980
|
+
/**
|
981
|
+
* This function removes a callback which was added by
|
982
|
+
* `AddGCPrologueCallback`.
|
983
|
+
*
|
984
|
+
* \param callback the callback to remove.
|
922
985
|
*/
|
923
|
-
void RemoveGCPrologueCallback(GCCallbackWithData, void* data = nullptr);
|
924
986
|
void RemoveGCPrologueCallback(GCCallback callback);
|
925
987
|
|
988
|
+
/**
|
989
|
+
* \copydoc AddGCPrologueCallback(GCCallback)
|
990
|
+
*
|
991
|
+
* \param data Additional data that was used to install the callback.
|
992
|
+
*/
|
993
|
+
void RemoveGCPrologueCallback(GCCallbackWithData, void* data = nullptr);
|
994
|
+
|
995
|
+
/**
|
996
|
+
* Enables the host application to receive a notification after a
|
997
|
+
* garbage collection.
|
998
|
+
*
|
999
|
+
* \copydetails AddGCPrologueCallback(GCCallback, GCType)
|
1000
|
+
*/
|
1001
|
+
void AddGCEpilogueCallback(GCCallback callback,
|
1002
|
+
GCType gc_type_filter = kGCTypeAll);
|
1003
|
+
|
1004
|
+
/**
|
1005
|
+
* \copydoc AddGCEpilogueCallback(GCCallback, GCType)
|
1006
|
+
*
|
1007
|
+
* \param data Additional data that should be passed to the callback.
|
1008
|
+
*/
|
1009
|
+
void AddGCEpilogueCallback(GCCallbackWithData callback, void* data = nullptr,
|
1010
|
+
GCType gc_type_filter = kGCTypeAll);
|
1011
|
+
|
1012
|
+
/**
|
1013
|
+
* This function removes a callback which was added by
|
1014
|
+
* `AddGCEpilogueCallback`.
|
1015
|
+
*
|
1016
|
+
* \param callback the callback to remove.
|
1017
|
+
*/
|
1018
|
+
void RemoveGCEpilogueCallback(GCCallback callback);
|
1019
|
+
|
1020
|
+
/**
|
1021
|
+
* \copydoc RemoveGCEpilogueCallback(GCCallback)
|
1022
|
+
*
|
1023
|
+
* \param data Additional data that was used to install the callback.
|
1024
|
+
*/
|
1025
|
+
void RemoveGCEpilogueCallback(GCCallbackWithData callback,
|
1026
|
+
void* data = nullptr);
|
1027
|
+
|
926
1028
|
/**
|
927
1029
|
* Sets an embedder roots handle that V8 should consider when performing
|
928
1030
|
* non-unified heap garbage collections. The intended use case is for setting
|
@@ -939,12 +1041,20 @@ class V8_EXPORT Isolate {
|
|
939
1041
|
*
|
940
1042
|
* Multi-threaded use requires the use of v8::Locker/v8::Unlocker, see
|
941
1043
|
* CppHeap.
|
1044
|
+
*
|
1045
|
+
* If a CppHeap is set via CreateParams, then this call is a noop.
|
942
1046
|
*/
|
1047
|
+
V8_DEPRECATE_SOON(
|
1048
|
+
"Set the heap on Isolate creation using CreateParams instead.")
|
943
1049
|
void AttachCppHeap(CppHeap*);
|
944
1050
|
|
945
1051
|
/**
|
946
1052
|
* Detaches a managed C++ heap if one was attached using `AttachCppHeap()`.
|
1053
|
+
*
|
1054
|
+
* If a CppHeap is set via CreateParams, then this call is a noop.
|
947
1055
|
*/
|
1056
|
+
V8_DEPRECATE_SOON(
|
1057
|
+
"Set the heap on Isolate creation using CreateParams instead.")
|
948
1058
|
void DetachCppHeap();
|
949
1059
|
|
950
1060
|
/**
|
@@ -1032,28 +1142,6 @@ class V8_EXPORT Isolate {
|
|
1032
1142
|
*/
|
1033
1143
|
void SetAtomicsWaitCallback(AtomicsWaitCallback callback, void* data);
|
1034
1144
|
|
1035
|
-
/**
|
1036
|
-
* Enables the host application to receive a notification after a
|
1037
|
-
* garbage collection. Allocations are allowed in the callback function,
|
1038
|
-
* but the callback is not re-entrant: if the allocation inside it will
|
1039
|
-
* trigger the garbage collection, the callback won't be called again.
|
1040
|
-
* It is possible to specify the GCType filter for your callback. But it is
|
1041
|
-
* not possible to register the same callback function two times with
|
1042
|
-
* different GCType filters.
|
1043
|
-
*/
|
1044
|
-
void AddGCEpilogueCallback(GCCallbackWithData callback, void* data = nullptr,
|
1045
|
-
GCType gc_type_filter = kGCTypeAll);
|
1046
|
-
void AddGCEpilogueCallback(GCCallback callback,
|
1047
|
-
GCType gc_type_filter = kGCTypeAll);
|
1048
|
-
|
1049
|
-
/**
|
1050
|
-
* This function removes callback which was installed by
|
1051
|
-
* AddGCEpilogueCallback function.
|
1052
|
-
*/
|
1053
|
-
void RemoveGCEpilogueCallback(GCCallbackWithData callback,
|
1054
|
-
void* data = nullptr);
|
1055
|
-
void RemoveGCEpilogueCallback(GCCallback callback);
|
1056
|
-
|
1057
1145
|
using GetExternallyAllocatedMemoryInBytesCallback = size_t (*)();
|
1058
1146
|
|
1059
1147
|
/**
|
@@ -1321,20 +1409,6 @@ class V8_EXPORT Isolate {
|
|
1321
1409
|
*/
|
1322
1410
|
void IsolateInBackgroundNotification();
|
1323
1411
|
|
1324
|
-
/**
|
1325
|
-
* Optional notification which will enable the memory savings mode.
|
1326
|
-
* V8 uses this notification to guide heuristics which may result in a
|
1327
|
-
* smaller memory footprint at the cost of reduced runtime performance.
|
1328
|
-
*/
|
1329
|
-
V8_DEPRECATED("Use IsolateInBackgroundNotification() instead")
|
1330
|
-
void EnableMemorySavingsMode();
|
1331
|
-
|
1332
|
-
/**
|
1333
|
-
* Optional notification which will disable the memory savings mode.
|
1334
|
-
*/
|
1335
|
-
V8_DEPRECATED("Use IsolateInBackgroundNotification() instead")
|
1336
|
-
void DisableMemorySavingsMode();
|
1337
|
-
|
1338
1412
|
/**
|
1339
1413
|
* Optional notification to tell V8 the current performance requirements
|
1340
1414
|
* of the embedder based on RAIL.
|
@@ -1506,21 +1580,20 @@ class V8_EXPORT Isolate {
|
|
1506
1580
|
|
1507
1581
|
void SetWasmLoadSourceMapCallback(WasmLoadSourceMapCallback callback);
|
1508
1582
|
|
1509
|
-
|
1510
|
-
|
1583
|
+
void SetWasmImportedStringsEnabledCallback(
|
1584
|
+
WasmImportedStringsEnabledCallback callback);
|
1511
1585
|
|
1512
|
-
|
1513
|
-
|
1586
|
+
void SetSharedArrayBufferConstructorEnabledCallback(
|
1587
|
+
SharedArrayBufferConstructorEnabledCallback callback);
|
1588
|
+
|
1589
|
+
void SetWasmJSPIEnabledCallback(WasmJSPIEnabledCallback callback);
|
1514
1590
|
|
1515
1591
|
/**
|
1516
|
-
* Register callback to control
|
1517
|
-
*
|
1518
|
-
* If the callback returns true, it will also enable Wasm stringrefs.
|
1592
|
+
* Register callback to control whether compile hints magic comments are
|
1593
|
+
* enabled.
|
1519
1594
|
*/
|
1520
|
-
void
|
1521
|
-
|
1522
|
-
void SetSharedArrayBufferConstructorEnabledCallback(
|
1523
|
-
SharedArrayBufferConstructorEnabledCallback callback);
|
1595
|
+
void SetJavaScriptCompileHintsMagicEnabledCallback(
|
1596
|
+
JavaScriptCompileHintsMagicEnabledCallback callback);
|
1524
1597
|
|
1525
1598
|
/**
|
1526
1599
|
* This function can be called by the embedder to signal V8 that the dynamic
|
@@ -1583,6 +1656,7 @@ class V8_EXPORT Isolate {
|
|
1583
1656
|
* heap. GC is not invoked prior to iterating, therefore there is no
|
1584
1657
|
* guarantee that visited objects are still alive.
|
1585
1658
|
*/
|
1659
|
+
V8_DEPRECATE_SOON("Will be removed without replacement. crbug.com/v8/14172")
|
1586
1660
|
void VisitExternalResources(ExternalResourceVisitor* visitor);
|
1587
1661
|
|
1588
1662
|
/**
|
@@ -1673,10 +1747,12 @@ uint32_t Isolate::GetNumberOfDataSlots() {
|
|
1673
1747
|
|
1674
1748
|
template <class T>
|
1675
1749
|
MaybeLocal<T> Isolate::GetDataFromSnapshotOnce(size_t index) {
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1750
|
+
if (auto slot = GetDataFromSnapshotOnce(index); slot) {
|
1751
|
+
internal::PerformCastCheck(
|
1752
|
+
internal::ValueHelper::SlotAsValue<T, false>(slot));
|
1753
|
+
return Local<T>::FromSlot(slot);
|
1754
|
+
}
|
1755
|
+
return {};
|
1680
1756
|
}
|
1681
1757
|
|
1682
1758
|
} // namespace v8
|