Skip to content

Commit 42729f0

Browse files
targosaduh95
authored andcommitted
src: stop using deprecated v8::Context::GetIsolate
Refs: 5623194 PR-URL: #60223 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
1 parent 6735585 commit 42729f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ v8::MaybeLocal<v8::Value> ToV8Value(v8::Local<v8::Context> context,
359359
v8::MaybeLocal<v8::Value> ToV8Value(v8::Local<v8::Context> context,
360360
std::u16string_view str,
361361
v8::Isolate* isolate) {
362-
if (isolate == nullptr) isolate = context->GetIsolate();
362+
if (isolate == nullptr) isolate = v8::Isolate::GetCurrent();
363363
if (str.length() >= static_cast<size_t>(v8::String::kMaxLength))
364364
[[unlikely]] {
365365
// V8 only has a TODO comment about adding an exception when the maximum

0 commit comments

Comments
 (0)