diff --git a/src/node_external_reference.h b/src/node_external_reference.h index 40e8a971b08302..e256e393e29957 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -42,8 +42,7 @@ class ExternalReferenceRegistry { // Registers both the underlying function pointer // and the corresponding CFunctionInfo. void Register(const v8::CFunction& c_func) { - RegisterT(c_func.GetAddress()); - RegisterT(c_func.GetTypeInfo()); + RegisterT(&c_func); } // This can be called only once. diff --git a/src/node_wasi.cc b/src/node_wasi.cc index 7ee59f46331097..5cd9115611f15e 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -234,7 +234,7 @@ void WASI::New(const FunctionCallbackInfo& args) { template void WASI::WasiFunction::SetFunction( Environment* env, const char* name, Local tmpl) { - auto c_function = CFunction::Make(FastCallback); + static auto c_function = CFunction::Make(FastCallback); Local t = FunctionTemplate::New(env->isolate(), SlowCallback,