diff --git a/shared/bindings/BindingsMain.cpp b/shared/bindings/BindingsMain.cpp index 4bd62a42..ac64f040 100644 --- a/shared/bindings/BindingsMain.cpp +++ b/shared/bindings/BindingsMain.cpp @@ -466,9 +466,10 @@ static void GetNetTime(const v8::FunctionCallbackInfo& info) V8_RETURN_UINT(netTime); } -static v8::MaybeLocal HandlePreBootstrapImport(v8::Local context, v8::Local specifier, v8::Local, v8::Local referrer) { +// Enums module doesn't need to import any modules +static v8::MaybeLocal HandleEnumsModuleImport(v8::Local context, v8::Local specifier, v8::Local, v8::Local referrer) { v8::MaybeLocal maybeModule; - Log::Error << "HandlePreBootstrapImport" << Log::Endl; + Log::Error << "Enums module must not import anything" << Log::Endl; return maybeModule; } @@ -485,7 +486,7 @@ static void AddEnumsToSharedModuleExports(v8::Isolate* isolate, v8::Local result = mod->InstantiateModule(ctx, HandlePreBootstrapImport); + v8::Maybe result = mod->InstantiateModule(ctx, HandleEnumsModuleImport); if(result.IsNothing() || result.ToChecked() == false) { Log::Error << "Failed to instantiate js-enums module" << Log::Endl;