diff --git a/src/addon.cpp b/src/addon.cpp index 686a3d57..6997f6d9 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -451,9 +451,14 @@ PerContextData *Main(Local exports) { //FunctionTemplate::New(isolate, uWS_log)->GetFunction(isolate->GetCurrentContext()).ToLocalChecked() + //left indented are for nodejs 20, else is for 21 FunctionTemplate::New(isolate, SlowByteLengthUtf8, + + Local(), + Local(), + 0, v8::ConstructorBehavior::kThrow, v8::SideEffectType::kHasNoSideEffect, &fast_byte_length_utf8)->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()