Skip to content

Commit 15fa8e0

Browse files
agraciokkoopa
authored andcommitted
using SetPrototypeV2() method for v8 version 14.0 and higher
1 parent 6bff40d commit 15fa8e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nan_maybe_43_inl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ inline Maybe<bool> SetPrototype(
207207
, v8::Local<v8::Value> prototype) {
208208
v8::Isolate *isolate = v8::Isolate::GetCurrent();
209209
v8::HandleScope scope(isolate);
210-
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 14 || \
211-
(V8_MAJOR_VERSION == 14 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 0))
210+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION >= 14)
212211
return obj->SetPrototypeV2(isolate->GetCurrentContext(), prototype);
213212
#else
214213
return obj->SetPrototype(isolate->GetCurrentContext(), prototype);

0 commit comments

Comments
 (0)