diff --git a/common.gypi b/common.gypi index ba4966e435171c..fcfdbfef28188a 100644 --- a/common.gypi +++ b/common.gypi @@ -29,7 +29,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.21', + 'v8_embedder_string': '-node.22', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 67c1e1065fefce..249a4aa184d989 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -2674,7 +2674,9 @@ class V8_EXPORT String : public Name { * Returns the number of bytes in the UTF-8 encoded * representation of this string. */ - int Utf8Length() const; + V8_DEPRECATE_SOON("Use Isolate version instead", int Utf8Length() const); + + int Utf8Length(Isolate* isolate) const; /** * Returns whether this string is known to contain only one byte data, diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index ffb685320667b2..65ab80ea7f4d88 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -5484,6 +5484,9 @@ bool String::ContainsOnlyOneByte() const { return helper.Check(*str); } +int String::Utf8Length(Isolate* isolate) const { + return Utf8Length(); +} int String::Utf8Length() const { i::Handle str = Utils::OpenHandle(this);