Skip to content

Commit

Permalink
Avoid FixedArray types which are missing in NodeJS
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 5, 2024
1 parent 37f5b95 commit 223f144
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ static void fatal_cb(const char* location, const char* message){

static v8::Local<v8::Module> read_module(std::string filename, v8::Local<v8::Context> context);

template <typename DUMMY>
static v8::MaybeLocal<v8::Module> ResolveModuleCallback(v8::Local<v8::Context> context,
v8::Local<v8::String> specifier,
v8::Local<v8::FixedArray> import_attributes,
DUMMY import_attributes,
v8::Local<v8::Module> referrer) {
v8::String::Utf8Value name(context->GetIsolate(), specifier);
return read_module(*name, context);
Expand Down Expand Up @@ -117,11 +118,12 @@ static v8::MaybeLocal<v8::Promise> ResolveDynamicModuleCallback(

#else

template <typename DUMMY>
static v8::MaybeLocal<v8::Promise> ResolveDynamicModuleCallback(
v8::Local<v8::Context> context,
v8::Local<v8::ScriptOrModule> referrer,
v8::Local<v8::String> specifier,
v8::Local<v8::FixedArray> import_assertions) {
DUMMY import_assertions) {
return dynamic_module_loader(context, specifier);
}

Expand Down

0 comments on commit 223f144

Please sign in to comment.