Uh oh!
There was an error while loading. Please reload this page.
Make sure wrapcallback is used - #762
Closed
gabrielschulhof wants to merge 2 commits into
Closed
Conversation
mhdawson
approved these changes
Jul 9, 2020
mhdawson
left a comment
Member
There was a problem hiding this comment.
LGTM, @gabrielschulhof I assume the extra overhead of another call is not going to be significant as finalization is not too common?
gabrielschulhof
commented
Jul 9, 2020
ContributorAuthor
@mhdawson it should be inlined. |
Member
@gabrielschulhof I assume you mean by the compiler, if so that makes sense as I see you have it marked as inline |
gabrielschulhof
commented
Jul 10, 2020
ContributorAuthor
@mhdawson, yeah, sorry, I meant by the compiler. |
gabrielschulhof
commented
Jul 29, 2020
ContributorAuthor
I believe this is blocked by #773. |
gabrielschulhofforce-pushed
the
make-sure-wrapcallback-is-used
branch
from
July 30, 2020 18:26
fe30826 to
c1cdb39Comparegabrielschulhof
requested review from
KevinEady, addaleax, legendecas and mhdawsonJuly 30, 2020 18:42
gabrielschulhof
commented
Jul 30, 2020
ContributorAuthor
Rebased on top of #773. I had to change the child process to examine the exception in the process' |
gabrielschulhofforce-pushed
the
make-sure-wrapcallback-is-used
branch
from
July 30, 2020 19:00
c1cdb39 to
db0af19CompareContributorAuthor
ContributorAuthor
gabrielschulhof pushed a commit
that referenced
this pull request
Aug 6, 2020
Make sure C++ exceptions thrown from a finalizer are converted into JS exceptions just as they are in regular callbacks. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #762 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> test: add finalizer exception test src: wrap finalizer callback
gabrielschulhof
commented
Aug 6, 2020
ContributorAuthor
Landed in cec2c76. |
kevindavies8 added a commit
to kevindavies8/node-addon-api-Develop
that referenced
this pull request
Aug 24, 2022
Make sure C++ exceptions thrown from a finalizer are converted into JS exceptions just as they are in regular callbacks. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> test: add finalizer exception test src: wrap finalizer callback
Marlyfleitas added a commit
to Marlyfleitas/node-api-addon-Development
that referenced
this pull request
Aug 26, 2022
Make sure C++ exceptions thrown from a finalizer are converted into JS exceptions just as they are in regular callbacks. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> test: add finalizer exception test src: wrap finalizer callback
wroy7860 added a commit
to wroy7860/addon-api-benchmark-node
that referenced
this pull request
Sep 19, 2022
Make sure C++ exceptions thrown from a finalizer are converted into JS exceptions just as they are in regular callbacks. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> test: add finalizer exception test src: wrap finalizer callback
johnfrench3 pushed a commit
to johnfrench3/node-addon-api-git
that referenced
this pull request
Aug 11, 2023
Make sure C++ exceptions thrown from a finalizer are converted into JS exceptions just as they are in regular callbacks. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> test: add finalizer exception test src: wrap finalizer callback
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 freeto 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.
Finalizers are also able to call JS code and therefore throw. Thus, when calling the user's finalizer, we should wrap it in our C++-to-JS-exception converter.