From 1e849456a786f40854a61ff21cdf445351a09ad8 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Sat, 12 Oct 2024 01:03:14 +0200 Subject: [PATCH] Fix Debian testing --- src/bindings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bindings.cpp b/src/bindings.cpp index cb49ef3..a7c4b17 100644 --- a/src/bindings.cpp +++ b/src/bindings.cpp @@ -6,7 +6,9 @@ /* we dont assume is installed */ #ifdef ISNODEJS -#if V8_MAJOR_VERSION == 10 +#if V8_MAJOR_VERSION == 11 +#define NODEJS_LTS_API 20 +#elif V8_MAJOR_VERSION == 10 #define NODEJS_LTS_API 18 #elif V8_MAJOR_VERSION == 9 #define NODEJS_LTS_API 16 @@ -133,7 +135,7 @@ static v8::ScriptOrigin make_origin(std::string filename){ return v8::ScriptOrigin(ToJSString( filename.c_str()), v8::Integer::New(isolate, 0), v8::Integer::New(isolate, 0), v8::False(isolate), v8::Local(), v8::Local(), v8::False(isolate), v8::False(isolate), v8::True(isolate)); -#elif V8_VERSION_TOTAL < 1201 +#elif V8_VERSION_TOTAL < 1201 || NODEJS_LTS_API == 20 return v8::ScriptOrigin(isolate,ToJSString( filename.c_str()), 0, 0, false, -1, v8::Local(), false, false, true); #else