Uh oh!
There was an error while loading. Please reload this page.
[v10.x]: Backport instance data - #30537
Conversation
gabrielschulhof
commented
Nov 18, 2019
Needed for nodejs/node-addon-api#567 |
nodejs-github-bot
commented
Nov 27, 2019
mhdawson
commented
Nov 27, 2019
@gabrielf I assume the commit did not apply cleanly. Can you identify the parts you had to update in order to limit what we need to review? |
gabrielschulhof
commented
Dec 3, 2019
@mhdawson the separation of js_native_api from node_api is not present in this version, so backporting is not straight-forward. The |
nodejs-github-bot
commented
Dec 3, 2019
c15919b to
6911a3fComparegabrielschulhof
commented
Dec 4, 2019
Rebased. |
nodejs-github-bot
commented
Dec 4, 2019
nodejs-github-bot
commented
Dec 5, 2019
nodejs-github-bot
commented
Dec 5, 2019
6911a3f to
e73f742Comparegabrielschulhof
commented
Dec 5, 2019
Rebased again. |
nodejs-github-bot
commented
Dec 5, 2019
nodejs-github-bot
commented
Dec 6, 2019
e73f742 to
24eb78bComparegabrielschulhof
commented
Dec 8, 2019
Rebased again. |
nodejs-github-bot
commented
Dec 8, 2019
nodejs-github-bot
commented
Dec 8, 2019
99915bc to
8f3b8caCompareThese do not need to be macros. PR-URL: nodejs#26128 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds `napi_set_instance_data()` and `napi_get_instance_data()`, which allow native addons to store their data on and retrieve their data from `napi_env`. `napi_set_instance_data()` accepts a finalizer which is called when the `node::Environment()` is destroyed. This entails rendering the `napi_env` local to each add-on. Fixes: nodejs/abi-stable-node#378 PR-URL: nodejs#28682 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
24eb78b to
dc7d5fdComparenodejs-github-bot
commented
Dec 18, 2019
nodejs-github-bot
commented
Dec 18, 2019
nodejs-github-bot
commented
Dec 19, 2019
gabrielschulhof
commented
Dec 19, 2019
@BethGriggs can we get this into v10.x before it goes into maintenance? |
BethGriggs
commented
Dec 19, 2019
@gabrielschulhof, yes - we're aiming to have one more |
gabrielschulhof
commented
Feb 15, 2020
@BethGriggs is this still on track to land? |
@gabrielschulhof yes, but I'm unsure on the timing of the release (nodejs/Release#504 needs updating). |
nodejs-github-bot
commented
Feb 19, 2020
nodejs-github-bot
commented
Feb 24, 2020
BethGriggs
commented
Feb 24, 2020
Possibly will not get a green CI on this until #31887 lands (@AshCripps and I are currently working on backporting the appropriate flaky test markers from v12.x) |
This comment has been minimized.
This comment has been minimized.
CI: https://ci.nodejs.org/job/node-test-pull-request/29347/ ✅ (Known flake) |
Adds `napi_set_instance_data()` and `napi_get_instance_data()`, which allow native addons to store their data on and retrieve their data from `napi_env`. `napi_set_instance_data()` accepts a finalizer which is called when the `node::Environment()` is destroyed. This entails rendering the `napi_env` local to each add-on. Fixes: nodejs/abi-stable-node#378 PR-URL: #28682 Backport-PR-URL: #30537 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
BethGriggs
commented
Feb 25, 2020
Landed in 3f9cec3...f29fb14 |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes