Unverified Commit 5b2067c6 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

src: deprecate two- and one-argument AtExit()

Using `AtExit()` without an `Environment*` pointer or providing
an argument is almost always a sign of improperly relying on global
state and/or using `AtExit()` as an addon when the addon-targeting
`AddEnvironmentCleanupHook()` would be the better choice.

Deprecate those variants. This also updates the addon docs to
refer to `AddEnvironmentCleanupHook()` rather than `AtExit()`.

PR-URL: https://github.com/nodejs/node/pull/30227


Reviewed-By: default avatarDavid Carlier <devnexen@gmail.com>
Reviewed-By: default avatarFranziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent de119131
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment