diff options
author | Refael Ackermann <refack@gmail.com> | 2019-05-28 08:46:21 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-06-01 09:55:12 -0400 |
commit | ed74896b1fae1c163b3906163f3bf46326618ddb (patch) | |
tree | 7fb05c5a19808e0c5cd95837528e9005999cf540 /deps/v8/include | |
parent | 2a850cd0664a4eee51f44d0bb8c2f7a3fe444154 (diff) | |
download | android-node-v8-ed74896b1fae1c163b3906163f3bf46326618ddb.tar.gz android-node-v8-ed74896b1fae1c163b3906163f3bf46326618ddb.tar.bz2 android-node-v8-ed74896b1fae1c163b3906163f3bf46326618ddb.zip |
deps: update V8 to 7.5.288.22
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/include')
-rw-r--r-- | deps/v8/include/v8-profiler.h | 39 | ||||
-rw-r--r-- | deps/v8/include/v8-version.h | 4 | ||||
-rw-r--r-- | deps/v8/include/v8.h | 95 | ||||
-rw-r--r-- | deps/v8/include/v8config.h | 4 |
4 files changed, 105 insertions, 37 deletions
diff --git a/deps/v8/include/v8-profiler.h b/deps/v8/include/v8-profiler.h index ada2dbbe5c..672a694e07 100644 --- a/deps/v8/include/v8-profiler.h +++ b/deps/v8/include/v8-profiler.h @@ -48,7 +48,7 @@ template class V8_EXPORT std::vector<v8::CpuProfileDeoptInfo>; namespace v8 { // TickSample captures the information collected for each sample. -struct TickSample { +struct V8_EXPORT TickSample { // Internal profiling (with --prof + tools/$OS-tick-processor) wants to // include the runtime function we're calling. Externally exposed tick // samples don't care. @@ -129,6 +129,20 @@ class V8_EXPORT CpuProfileNode { unsigned int hit_count; }; + // An annotation hinting at the source of a CpuProfileNode. + enum SourceType { + // User-supplied script with associated resource information. + kScript = 0, + // Native scripts and provided builtins. + kBuiltin = 1, + // Callbacks into native code. + kCallback = 2, + // VM-internal functions or state. + kInternal = 3, + // A node that failed to symbolize. + kUnresolved = 4, + }; + /** Returns function name (empty string for anonymous functions.) */ Local<String> GetFunctionName() const; @@ -153,6 +167,12 @@ class V8_EXPORT CpuProfileNode { const char* GetScriptResourceNameStr() const; /** + * Return true if the script from where the function originates is flagged as + * being shared cross-origin. + */ + bool IsScriptSharedCrossOrigin() const; + + /** * Returns the number, 1-based, of the line where the function originates. * kNoLineNumberInfo if no line number information is available. */ @@ -194,12 +214,20 @@ class V8_EXPORT CpuProfileNode { /** Returns id of the node. The id is unique within the tree */ unsigned GetNodeId() const; + /** + * Gets the type of the source which the node was captured from. + */ + SourceType GetSourceType() const; + /** Returns child nodes count of the node. */ int GetChildrenCount() const; /** Retrieves a child node by index. */ const CpuProfileNode* GetChild(int index) const; + /** Retrieves the ancestor node, or null if the root. */ + const CpuProfileNode* GetParent() const; + /** Retrieves deopt infos for the node. */ const std::vector<CpuProfileDeoptInfo>& GetDeoptInfos() const; @@ -302,6 +330,15 @@ class V8_EXPORT CpuProfiler { void SetSamplingInterval(int us); /** + * Sets whether or not the profiler should prioritize consistency of sample + * periodicity on Windows. Disabling this can greatly reduce CPU usage, but + * may result in greater variance in sample timings from the platform's + * scheduler. Defaults to enabled. This method must be called when there are + * no profiles being recorded. + */ + void SetUsePreciseSampling(bool); + + /** * Starts collecting CPU profile. Title may be an empty string. It * is allowed to have several profiles being collected at * once. Attempts to start collecting several profiles with the same diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 4093306dc8..dfcd5b467d 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -9,9 +9,9 @@ // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. #define V8_MAJOR_VERSION 7 -#define V8_MINOR_VERSION 4 +#define V8_MINOR_VERSION 5 #define V8_BUILD_NUMBER 288 -#define V8_PATCH_LEVEL 27 +#define V8_PATCH_LEVEL 22 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 7e48cd422d..b4b920555b 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -2520,9 +2520,9 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal<BigInt> ToBigInt( Local<Context> context) const; - V8_DEPRECATE_SOON("ToBoolean can never throw. Use Local version.", - V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean( - Local<Context> context) const); + V8_DEPRECATED("ToBoolean can never throw. Use Local version.", + V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean( + Local<Context> context) const); V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber( Local<Context> context) const; V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString( @@ -2538,16 +2538,16 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const; Local<Boolean> ToBoolean(Isolate* isolate) const; - V8_DEPRECATE_SOON("Use maybe version", - Local<Number> ToNumber(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local<String> ToString(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local<Object> ToObject(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local<Integer> ToInteger(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local<Int32> ToInt32(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local<Number> ToNumber(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local<String> ToString(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local<Object> ToObject(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local<Integer> ToInteger(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local<Int32> ToInt32(Isolate* isolate) const); /** * Attempts to convert a string to an array index. @@ -2906,7 +2906,7 @@ class V8_EXPORT String : public Name { int length = -1); /** Allocates a new string from UTF-16 data.*/ - static V8_DEPRECATE_SOON( + static V8_DEPRECATED( "Use maybe version", Local<String> NewFromTwoByte(Isolate* isolate, const uint16_t* data, NewStringType type = kNormalString, @@ -2955,7 +2955,7 @@ class V8_EXPORT String : public Name { * should the underlying buffer be deallocated or modified except through the * destructor of the external string resource. */ - static V8_DEPRECATE_SOON( + static V8_DEPRECATED( "Use maybe version", Local<String> NewExternal(Isolate* isolate, ExternalOneByteStringResource* resource)); @@ -5164,8 +5164,7 @@ class V8_EXPORT SharedArrayBuffer : public Object { allocation_length_(0), allocation_mode_(Allocator::AllocationMode::kNormal), deleter_(nullptr), - deleter_data_(nullptr), - is_growable_(false) {} + deleter_data_(nullptr) {} void* AllocationBase() const { return allocation_base_; } size_t AllocationLength() const { return allocation_length_; } @@ -5177,13 +5176,12 @@ class V8_EXPORT SharedArrayBuffer : public Object { size_t ByteLength() const { return byte_length_; } DeleterCallback Deleter() const { return deleter_; } void* DeleterData() const { return deleter_data_; } - bool IsGrowable() const { return is_growable_; } private: Contents(void* data, size_t byte_length, void* allocation_base, size_t allocation_length, Allocator::AllocationMode allocation_mode, DeleterCallback deleter, - void* deleter_data, bool is_growable); + void* deleter_data); void* data_; size_t byte_length_; @@ -5192,7 +5190,6 @@ class V8_EXPORT SharedArrayBuffer : public Object { Allocator::AllocationMode allocation_mode_; DeleterCallback deleter_; void* deleter_data_; - bool is_growable_; friend class SharedArrayBuffer; }; @@ -5224,9 +5221,11 @@ class V8_EXPORT SharedArrayBuffer : public Object { * Create a new SharedArrayBuffer over an existing memory block. Propagate * flags to indicate whether the underlying buffer can be grown. */ - static Local<SharedArrayBuffer> New( - Isolate* isolate, const SharedArrayBuffer::Contents&, - ArrayBufferCreationMode mode = ArrayBufferCreationMode::kExternalized); + V8_DEPRECATED("Use New method with data, and byte_length instead.", + static Local<SharedArrayBuffer> New( + Isolate* isolate, const SharedArrayBuffer::Contents&, + ArrayBufferCreationMode mode = + ArrayBufferCreationMode::kExternalized)); /** * Returns true if SharedArrayBuffer is externalized, that is, does not @@ -5315,11 +5314,10 @@ class V8_EXPORT Date : public Object { * This API should not be called more than needed as it will * negatively impact the performance of date operations. */ - V8_DEPRECATE_SOON( - "Use Isolate::DateTimeConfigurationChangeNotification", - static void DateTimeConfigurationChangeNotification( - Isolate* isolate, - TimeZoneDetection time_zone_detection = TimeZoneDetection::kSkip)); + V8_DEPRECATED("Use Isolate::DateTimeConfigurationChangeNotification", + static void DateTimeConfigurationChangeNotification( + Isolate* isolate, TimeZoneDetection time_zone_detection = + TimeZoneDetection::kSkip)); private: static void CheckCast(Value* obj); @@ -6681,7 +6679,7 @@ typedef void (*HostInitializeImportMetaObjectCallback)(Local<Context> context, * first accessed. The return value will be used as the stack value. If this * callback is registed, the |Error.prepareStackTrace| API will be disabled. * |sites| is an array of call sites, specified in - * https://github.com/v8/v8/wiki/Stack-Trace-API + * https://v8.dev/docs/stack-trace-api */ typedef MaybeLocal<Value> (*PrepareStackTraceCallback)(Local<Context> context, Local<Value> error, @@ -6735,7 +6733,8 @@ class PromiseRejectMessage { typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); // --- Microtasks Callbacks --- -typedef void (*MicrotasksCompletedCallback)(Isolate*); +V8_DEPRECATE_SOON("Use *WithData version.", + typedef void (*MicrotasksCompletedCallback)(Isolate*)); typedef void (*MicrotasksCompletedCallbackWithData)(Isolate*, void*); typedef void (*MicrotaskCallback)(void* data); @@ -6769,7 +6768,8 @@ class V8_EXPORT MicrotaskQueue { /** * Creates an empty MicrotaskQueue instance. */ - static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate); + static std::unique_ptr<MicrotaskQueue> New( + Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto); virtual ~MicrotaskQueue() = default; @@ -6817,6 +6817,12 @@ class V8_EXPORT MicrotaskQueue { */ virtual bool IsRunningMicrotasks() const = 0; + /** + * Returns the current depth of nested MicrotasksScope that has + * kRunMicrotasks. + */ + virtual int GetMicrotasksScopeDepth() const = 0; + private: friend class internal::MicrotaskQueue; MicrotaskQueue() = default; @@ -7165,6 +7171,13 @@ enum JitCodeEventOptions { */ typedef void (*JitCodeEventHandler)(const JitCodeEvent* event); +/** + * Callback function passed to SetUnhandledExceptionCallback. + */ +#if defined(V8_OS_WIN) +typedef int (*UnhandledExceptionCallback)( + _EXCEPTION_POINTERS* exception_pointers); +#endif /** * Interface for iterating through all external resources in the heap. @@ -8379,13 +8392,13 @@ class V8_EXPORT Isolate { /** * Returns a memory range that can potentially contain jitted code. Code for * V8's 'builtins' will not be in this range if embedded builtins is enabled. - * Instead, see GetEmbeddedCodeRange. * * On Win64, embedders are advised to install function table callbacks for * these ranges, as default SEH won't be able to unwind through jitted code. - * * The first page of the code range is reserved for the embedder and is - * committed, writable, and executable. + * committed, writable, and executable, to be used to store unwind data, as + * documented in + * https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64. * * Might be empty on other platforms. * @@ -8785,6 +8798,20 @@ class V8_EXPORT V8 { */ static bool EnableWebAssemblyTrapHandler(bool use_v8_signal_handler); +#if defined(V8_OS_WIN) + /** + * On Win64, by default V8 does not emit unwinding data for jitted code, + * which means the OS cannot walk the stack frames and the system Structured + * Exception Handling (SEH) cannot unwind through V8-generated code: + * https://code.google.com/p/v8/issues/detail?id=3598. + * + * This function allows embedders to register a custom exception handler for + * exceptions in V8-generated code. + */ + static void SetUnhandledExceptionCallback( + UnhandledExceptionCallback unhandled_exception_callback); +#endif + private: V8(); diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index e30a582e8f..5ec0480cf5 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -64,6 +64,7 @@ // V8_OS_FUCHSIA - Fuchsia // V8_OS_LINUX - Linux // V8_OS_MACOSX - Mac OS X +// V8_OS_IOS - iOS // V8_OS_NETBSD - NetBSD // V8_OS_OPENBSD - OpenBSD // V8_OS_POSIX - POSIX compatible (mostly everything except Windows) @@ -80,6 +81,9 @@ # define V8_OS_BSD 1 # define V8_OS_MACOSX 1 # define V8_OS_POSIX 1 +# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +# define V8_OS_IOS 1 +# endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE #elif defined(__CYGWIN__) # define V8_OS_CYGWIN 1 # define V8_OS_POSIX 1 |