diff --git a/common.gypi b/common.gypi index 0316afe7048df0..64c70c83975bee 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.19', + 'v8_embedder_string': '-node.20', # 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 362bece11f65a2..0f1f74e6a120a4 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -1828,7 +1828,9 @@ class V8_EXPORT StackTrace { /** * Returns a StackFrame at a particular index. */ - Local GetFrame(uint32_t index) const; + V8_DEPRECATE_SOON("Use Isolate version", + Local GetFrame(uint32_t index) const); + Local GetFrame(Isolate* isolate, uint32_t index) const; /** * Returns the number of StackFrames. diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 5f8f3752008759..3fec027b01d546 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -3023,15 +3023,20 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) { // --- S t a c k T r a c e --- -Local StackTrace::GetFrame(uint32_t index) const { - i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); +Local StackTrace::GetFrame(Isolate* v8_isolate, + uint32_t index) const { + i::Isolate* isolate = reinterpret_cast(v8_isolate); ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); - EscapableHandleScope scope(reinterpret_cast(isolate)); + EscapableHandleScope scope(v8_isolate); auto obj = handle(Utils::OpenHandle(this)->get(index), isolate); auto info = i::Handle::cast(obj); return scope.Escape(Utils::StackFrameToLocal(info)); } +Local StackTrace::GetFrame(uint32_t index) const { + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); + return GetFrame(reinterpret_cast(isolate), index); +} int StackTrace::GetFrameCount() const { return Utils::OpenHandle(this)->length();