n-api: do not require JS Context for `napi_async_destroy()` by addaleax · Pull Request #27255 · nodejs/node

@addaleax

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

@nodejs-github-bot nodejs-github-bot added the c++

Issues and PRs that require attention from people who are familiar with C++.

label

Apr 16, 2019
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.

bnoordhuis

@addaleax addaleax changed the title n-api: do not requires JS Context for napi_async_destroy() n-api: do not require JS Context for napi_async_destroy()

Apr 16, 2019

@addaleax

mhdawson

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Apr 16, 2019

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>

addaleax added a commit that referenced this pull request

Apr 24, 2019
Allow the function to be called during GC, which is a common use case.

Fixes: #27218

PR-URL: #27255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

addaleax added a commit that referenced this pull request

Apr 24, 2019
Allow the destructor to be called during GC,
which is a common use case.

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 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 pushed a commit that referenced this pull request

Apr 27, 2019
Allow the function to be called during GC, which is a common use case.

Fixes: #27218

PR-URL: #27255
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 pushed a commit that referenced this pull request

Apr 27, 2019
Allow the destructor to be called during GC,
which is a common use case.

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

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