Skip to content

Commit

Permalink
Avoiding FixedArray
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 5, 2024
1 parent c6152f9 commit ca66213
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#endif
#endif

#if !defined(ISNODEJS) || NODEJS_LTS_API > 16
using FixedArrayType = v8::Local<v8::FixedArray>;
#else
using FixedArrayType = int;
#endif

#if V8_VERSION_TOTAL < 803
#define PerformMicrotaskCheckpoint RunMicrotasks
#endif
Expand Down Expand Up @@ -79,7 +85,7 @@ static v8::Local<v8::Module> read_module(std::string filename, v8::Local<v8::Con

static v8::MaybeLocal<v8::Module> ResolveModuleCallback(v8::Local<v8::Context> context,
v8::Local<v8::String> specifier,
v8::Local<v8::FixedArray> import_attributes,
FixedArrayType import_attributes,
v8::Local<v8::Module> referrer) {
v8::String::Utf8Value name(context->GetIsolate(), specifier);
return read_module(*name, context);
Expand Down Expand Up @@ -113,7 +119,9 @@ static v8::MaybeLocal<v8::Promise> ResolveDynamicModuleCallback(
v8::Local<v8::ScriptOrModule> referrer,
#endif
v8::Local<v8::String> specifier,
v8::Local<v8::FixedArray> import_assertions) {
FixedArrayType import_assertions

) {
return dynamic_module_loader(context, specifier);
}

Expand Down

0 comments on commit ca66213

Please sign in to comment.