diff --git a/common.gypi b/common.gypi index 070d1f01362856..c235f07712c74f 100644 --- a/common.gypi +++ b/common.gypi @@ -33,7 +33,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.34', + 'v8_embedder_string': '-node.35', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index 2c830bf834b786..d001514f9883be 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/include/libplatform/libplatform.h @@ -41,7 +41,7 @@ V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform( InProcessStackDumping::kDisabled, std::unique_ptr tracing_controller = {}); -V8_PLATFORM_EXPORT V8_DEPRECATE_SOON( +V8_PLATFORM_EXPORT V8_DEPRECATED( "Use NewDefaultPlatform instead", v8::Platform* CreateDefaultPlatform( int thread_pool_size = 0, diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 05ab9b05210ab4..55ad7c8cf220cc 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -1019,8 +1019,12 @@ class V8_EXPORT PrimitiveArray { public: static Local New(Isolate* isolate, int length); int Length() const; - void Set(int index, Local item); - Local Get(int index); + V8_DEPRECATED("Use Isolate* version", + void Set(int index, Local item)); + V8_DEPRECATED("Use Isolate* version", + Local Get(int index)); + void Set(Isolate* isolate, int index, Local item); + Local Get(Isolate* isolate, int index); }; /** @@ -1735,8 +1739,8 @@ class V8_EXPORT StackTrace { /** * Returns a StackFrame at a particular index. */ - V8_DEPRECATE_SOON("Use Isolate version", - Local GetFrame(uint32_t index) const); + V8_DEPRECATED("Use Isolate version", + Local GetFrame(uint32_t index) const); Local GetFrame(Isolate* isolate, uint32_t index) const; /** @@ -2432,25 +2436,25 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT MaybeLocal ToInt32(Local context) const; - V8_DEPRECATE_SOON("Use maybe version", - Local ToBoolean(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToNumber(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToString(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToObject(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger(Isolate* isolate) const); - V8_DEPRECATE_SOON("Use maybe version", - Local ToInt32(Isolate* isolate) const); - - inline V8_DEPRECATE_SOON("Use maybe version", - Local ToBoolean() const); - inline V8_DEPRECATE_SOON("Use maybe version", Local ToString() const); - inline V8_DEPRECATE_SOON("Use maybe version", Local ToObject() const); - inline V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger() const); + V8_DEPRECATED("Use maybe version", + Local ToBoolean(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToNumber(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToString(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToObject(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToInteger(Isolate* isolate) const); + V8_DEPRECATED("Use maybe version", + Local ToInt32(Isolate* isolate) const); + + inline V8_DEPRECATED("Use maybe version", + Local ToBoolean() const); + inline V8_DEPRECATED("Use maybe version", Local ToString() const); + inline V8_DEPRECATED("Use maybe version", Local ToObject() const); + inline V8_DEPRECATED("Use maybe version", + Local ToInteger() const); /** * Attempts to convert a string to an array index. @@ -2467,14 +2471,14 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT Maybe Int32Value(Local context) const; - V8_DEPRECATE_SOON("Use maybe version", bool BooleanValue() const); - V8_DEPRECATE_SOON("Use maybe version", double NumberValue() const); - V8_DEPRECATE_SOON("Use maybe version", int64_t IntegerValue() const); - V8_DEPRECATE_SOON("Use maybe version", uint32_t Uint32Value() const); - V8_DEPRECATE_SOON("Use maybe version", int32_t Int32Value() const); + V8_DEPRECATED("Use maybe version", bool BooleanValue() const); + V8_DEPRECATED("Use maybe version", double NumberValue() const); + V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const); + V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const); + V8_DEPRECATED("Use maybe version", int32_t Int32Value() const); /** JS == */ - V8_DEPRECATE_SOON("Use maybe version", bool Equals(Local that) const); + V8_DEPRECATED("Use maybe version", bool Equals(Local that) const); V8_WARN_UNUSED_RESULT Maybe Equals(Local context, Local that) const; bool StrictEquals(Local that) const; @@ -2580,7 +2584,7 @@ class V8_EXPORT String : public Name { * Returns the number of bytes in the UTF-8 encoded * representation of this string. */ - V8_DEPRECATE_SOON("Use Isolate version instead", int Utf8Length() const); + V8_DEPRECATED("Use Isolate version instead", int Utf8Length() const); int Utf8Length(Isolate* isolate) const; @@ -2638,23 +2642,23 @@ class V8_EXPORT String : public Name { // 16-bit character codes. int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; - V8_DEPRECATE_SOON("Use Isolate* version", - int Write(uint16_t* buffer, int start = 0, int length = -1, - int options = NO_OPTIONS) const); + V8_DEPRECATED("Use Isolate* version", + int Write(uint16_t* buffer, int start = 0, int length = -1, + int options = NO_OPTIONS) const); // One byte characters. int WriteOneByte(Isolate* isolate, uint8_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; - V8_DEPRECATE_SOON("Use Isolate* version", - int WriteOneByte(uint8_t* buffer, int start = 0, - int length = -1, int options = NO_OPTIONS) - const); + V8_DEPRECATED("Use Isolate* version", + int WriteOneByte(uint8_t* buffer, int start = 0, + int length = -1, int options = NO_OPTIONS) + const); // UTF-8 encoded characters. int WriteUtf8(Isolate* isolate, char* buffer, int length = -1, int* nchars_ref = NULL, int options = NO_OPTIONS) const; - V8_DEPRECATE_SOON("Use Isolate* version", - int WriteUtf8(char* buffer, int length = -1, - int* nchars_ref = NULL, - int options = NO_OPTIONS) const); + V8_DEPRECATED("Use Isolate* version", + int WriteUtf8(char* buffer, int length = -1, + int* nchars_ref = NULL, + int options = NO_OPTIONS) const); /** * A zero length string. @@ -2818,9 +2822,9 @@ class V8_EXPORT String : public Name { */ static Local Concat(Isolate* isolate, Local left, Local right); - static V8_DEPRECATE_SOON("Use Isolate* version", - Local Concat(Local left, - Local right)); + static V8_DEPRECATED("Use Isolate* version", + Local Concat(Local left, + Local right)); /** * Creates a new external string using the data defined in the given @@ -5044,7 +5048,9 @@ class V8_EXPORT BooleanObject : public Object { */ class V8_EXPORT StringObject : public Object { public: - static Local New(Local value); + static Local New(Isolate* isolate, Local value); + V8_DEPRECATED("Use Isolate* version", + static Local New(Local value)); Local ValueOf() const; diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 09b2ae92dc8b1b..f68759f33bb16e 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -2227,6 +2227,10 @@ int PrimitiveArray::Length() const { return array->length(); } +void PrimitiveArray::Set(Isolate* isolate, int index, Local item) { + return Set(index, item); +} + void PrimitiveArray::Set(int index, Local item) { i::Handle array = Utils::OpenHandle(this); i::Isolate* isolate = array->GetIsolate(); @@ -2239,6 +2243,10 @@ void PrimitiveArray::Set(int index, Local item) { array->set(index, *i_item); } +Local PrimitiveArray::Get(Isolate* isolate, int index) { + return Get(index); +} + Local PrimitiveArray::Get(int index) { i::Handle array = Utils::OpenHandle(this); i::Isolate* isolate = array->GetIsolate(); @@ -6880,6 +6888,11 @@ bool v8::BooleanObject::ValueOf() const { } +Local v8::StringObject::New(Isolate* isolate, Local value) { + return New(value); +} + + Local v8::StringObject::New(Local value) { i::Handle string = Utils::OpenHandle(*value); i::Isolate* isolate = string->GetIsolate();