src: deprecate two- and one-argument AtExit()#30227
Closed
addaleax wants to merge 1 commit intonodejs:masterfrom
Closed
src: deprecate two- and one-argument AtExit()#30227addaleax wants to merge 1 commit intonodejs:masterfrom
addaleax wants to merge 1 commit intonodejs:masterfrom
Conversation
devnexen
approved these changes
Nov 3, 2019
fhinkel
reviewed
Nov 3, 2019
test/addons/at-exit/binding.cc
Outdated
Member
There was a problem hiding this comment.
Do you want to keep this as a todo or should we open an issue instead?
Member
Author
There was a problem hiding this comment.
I can open an issue about it once this lands. 👍
fhinkel
approved these changes
Nov 3, 2019
danbev
approved these changes
Nov 4, 2019
Collaborator
Collaborator
Collaborator
Collaborator
jasnell
approved these changes
Nov 5, 2019
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()`.
c66a706 to
7c59832
Compare
Collaborator
Collaborator
addaleax
added a commit
that referenced
this pull request
Nov 5, 2019
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: #30227 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
Author
|
Landed in 5b2067c, thanks for the reviews! |
addaleax
added a commit
to addaleax/node
that referenced
this pull request
Nov 5, 2019
Move the one bit of the addon test that was not covered by the cctest into the latter and delete the former. Refs: nodejs#30227 (comment)
3 tasks
Trott
pushed a commit
that referenced
this pull request
Nov 8, 2019
Move the one bit of the addon test that was not covered by the cctest into the latter and delete the former. Refs: #30227 (comment) PR-URL: #30275 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins
pushed a commit
that referenced
this pull request
Nov 17, 2019
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: #30227 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Nov 17, 2019
Move the one bit of the addon test that was not covered by the cctest into the latter and delete the former. Refs: #30227 (comment) PR-URL: #30275 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Merged
MylesBorins
added a commit
to BridgeAR/node
that referenced
this pull request
Nov 21, 2019
Notable changes:
* addons:
* Deprecate one- and two-argument `AtExit()`. Use the three-argument
variant of `AtExit()` or `AddEnvironmentCleanupHook()` instead
(Anna Henningsen) nodejs#30227
* child_process,cluster:
* The `serialization` option is added that allows child process
IPC to use the V8 serialization API (to e.g., pass through data
types like sets or maps) (Anna Henningsen)
nodejs#30162
* deps:
* Update V8 to 7.9
* Update `npm` to 6.13.0 (Ruy Adorno)
nodejs#30271
* embedder:
* Exposes the ability to pass cli flags / options through an API
as embedder (Shelley Vohr)
nodejs#30466
* Allow adding linked bindings to Environment (Anna Henningsen)
nodejs#30274
* esm:
* Unflag --experimental-modules (Guy Bedford)
nodejs#29866
* stream:
* Add `writable.writableCorked` property (Robert Nagy)
nodejs#29012
* worker:
* Allow specifying resource limits (Anna Henningsen)
nodejs#26628
* v8:
* The Serialization API is now stable (Anna Henningsen)
nodejs#30234
PR-URL: nodejs#30547
MylesBorins
added a commit
that referenced
this pull request
Nov 21, 2019
Notable changes:
* addons:
* Deprecate one- and two-argument `AtExit()`. Use the three-argument
variant of `AtExit()` or `AddEnvironmentCleanupHook()` instead
(Anna Henningsen) #30227
* child_process,cluster:
* The `serialization` option is added that allows child process
IPC to use the V8 serialization API (to e.g., pass through data
types like sets or maps) (Anna Henningsen)
#30162
* deps:
* Update V8 to 7.9
* Update `npm` to 6.13.0 (Ruy Adorno)
#30271
* embedder:
* Exposes the ability to pass cli flags / options through an API
as embedder (Shelley Vohr)
#30466
* Allow adding linked bindings to Environment (Anna Henningsen)
#30274
* esm:
* Unflag --experimental-modules (Guy Bedford)
#29866
* stream:
* Add `writable.writableCorked` property (Robert Nagy)
#29012
* worker:
* Allow specifying resource limits (Anna Henningsen)
#26628
* v8:
* The Serialization API is now stable (Anna Henningsen)
#30234
PR-URL: #30547
MylesBorins
pushed a commit
that referenced
this pull request
Jan 12, 2020
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: #30227 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Jan 12, 2020
Move the one bit of the addon test that was not covered by the cctest into the latter and delete the former. Refs: #30227 (comment) PR-URL: #30275 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
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: #30227 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
Move the one bit of the addon test that was not covered by the cctest into the latter and delete the former. Refs: #30227 (comment) PR-URL: #30275 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
AtExit()without anEnvironment*pointer or providingan argument is almost always a sign of improperly relying on global
state and/or using
AtExit()as an addon when the addon-targetingAddEnvironmentCleanupHook()would be the better choice.Deprecate those variants. This also updates the addon docs to
refer to
AddEnvironmentCleanupHook()rather thanAtExit().Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes