From 50cb290278a8282f79192575f3a42e13eec5caf0 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 27 Apr 2021 14:45:57 +0200 Subject: [PATCH] Fix build with Node 16 The overload of node::AtExit that takes only two arguments was removed in https://github.com/nodejs/node/commit/dfc288e7fdbe888f4e134772de421684247f0bea#diff-4acdf5a5c11188763423b746a9a43917c90546f3b48b9aa6f6eeb60e157ae2a7 --- crates/neon-sys/native/src/neon.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/neon-sys/native/src/neon.cc b/crates/neon-sys/native/src/neon.cc index b634fdc..56ca1d4 100644 --- a/crates/neon-sys/native/src/neon.cc +++ b/crates/neon-sys/native/src/neon.cc @@ -332,7 +332,7 @@ extern "C" void Neon_Class_SetClassMap(v8::Isolate *isolate, void *map, Neon_Dro neon::ClassMapHolder *holder = new neon::ClassMapHolder(map, drop_map); isolate->SetData(NEON_ISOLATE_SLOT, holder); // ISSUE(#77): When workers land in node, this will need to be generalized to a per-worker version. - node::AtExit(cleanup_class_map, holder); + node::AtExit(node::GetCurrentEnvironment(isolate->GetCurrentContext()), cleanup_class_map, holder); } extern "C" void *Neon_Class_GetCallKernel(void *wrapper) {