Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! src: use uv_async_t for WeakRefs
  • Loading branch information
addaleax committed Nov 27, 2019
commit 05a085d7227cd9538c97aae160bcc4c30e7b4161
3 changes: 1 addition & 2 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,7 @@ void Environment::InitializeLibuv(bool start_profiler_idle_notifier) {
Environment* env = ContainerOf(
&Environment::cleanup_finalization_groups_async_, async);
env->CleanupFinalizationGroups();
}
);
});
uv_unref(reinterpret_cast<uv_handle_t*>(&idle_prepare_handle_));
uv_unref(reinterpret_cast<uv_handle_t*>(&idle_check_handle_));
uv_unref(reinterpret_cast<uv_handle_t*>(&cleanup_finalization_groups_async_));
Expand Down
4 changes: 4 additions & 0 deletions test/parallel/test-finalization-group-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ setTimeout(() => {
name: 'Error',
message: 'test',
});

// Give the callbacks scheduled by global.gc() time to run, as the underlying
// uv_async_t is unref’ed.
setTimeout(() => {}, 200);
}, 200);

process.on('uncaughtException', common.mustCall());