{{ message }}
n-api: do not require JS Context for napi_async_destroy() #27255
Closed
addaleax wants to merge 4 commits into
Closed
n-api: do not require JS Context for napi_async_destroy() #27255addaleax wants to merge 4 commits into
napi_async_destroy() #27255addaleax wants to merge 4 commits into
Conversation
This can be necessary for being able to call the function when no JS Context is on the stack, e.g. during GC. Refs: nodejs#27218
Collaborator
Allow the function to be called during GC, which is a common use case. Fixes: nodejs#27218
Allow the destructor to be called during GC, which is a common use case.
75cdfaf to
66f6944
Compare
bnoordhuis
approved these changes
Apr 16, 2019
napi_async_destroy() napi_async_destroy()
Collaborator
jasnell
approved these changes
Apr 16, 2019
Member
Author
|
By the way, it sounds like there may not be any more v8.x semver-minor releases. (/cc @MylesBorins @nodejs/lts) I do think that this, as a bug fix, should end up in a v10.x and v8.x release, respectively, according to the usual rules for bug fixes. However, the first commit here is technically semver-minor. So, that leaves a few options:
Any preferences? |
Member
Author
|
Landed in #27255 |
addaleax
added a commit
that referenced
this pull request
Apr 24, 2019
This can be necessary for being able to call the function when no JS Context is on the stack, e.g. during GC. Refs: #27218 PR-URL: #27255 Fixes: #27218 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Member
targos
pushed a commit
that referenced
this pull request
Apr 27, 2019
This can be necessary for being able to call the function when no JS Context is on the stack, e.g. during GC. Refs: #27218 PR-URL: #27255 Fixes: #27218 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
targos
added a commit
that referenced
this pull request
Apr 27, 2019
Notable changes:
* intl:
* Update ICU to 64.2. This adds support for Japanese Era (Reiwa).
#27361
* Fixes a bug in ICU that affected Node.js 12.0.0 in the case where
`new Date().toLocaleString()` was called with a non-default locale.
#27415
* C++ API:
* Added an `Environment` overload of `EmitAsyncDestroy`.
#27255
PR-URL: TODO
Merged
targos
added a commit
that referenced
this pull request
Apr 29, 2019
Notable changes:
* intl:
* Update ICU to 64.2. This adds support for Japanese Era (Reiwa).
#27361
* Fixes a bug in ICU that affected Node.js 12.0.0 in the case where
`new Date().toLocaleString()` was called with a non-default locale.
#27415
* C++ API:
* Added an overload of `EmitAsyncDestroy` that can be used during
garbage collection.
#27255
PR-URL: #27440
targos
added a commit
that referenced
this pull request
Apr 29, 2019
Notable changes:
* intl:
* Update ICU to 64.2. This adds support for Japanese Era (Reiwa).
#27361
* Fixes a bug in ICU that affected Node.js 12.0.0 in the case where
`new Date().toLocaleString()` was called with a non-default locale.
#27415
* C++ API:
* Added an overload of `EmitAsyncDestroy` that can be used during
garbage collection.
#27255
PR-URL: #27440
4 tasks
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.

src: add
Environmentoverload ofEmitAsyncDestroyThis can be necessary for being able to call the function when no
JS Context is on the stack, e.g. during GC.
(This is technically semver-minor.)
n-api: do not require JS Context for
napi_async_destroy()Allow the function to be called during GC, which is a common use case.
Fixes: #27218
/cc @nodejs/n-api
src: do not require JS Context for
~AsyncResoure()Allow the destructor to be called during GC, which is a common use case.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes