Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 493
Make sure wrapcallback is used#762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure wrapcallback is used #762
Uh oh!
There was an error while loading. Please reload this page.
Conversation
mhdawson left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@mhdawson it should be inlined. |
mhdawson commented Jul 9, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@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
@mhdawson, yeah, sorry, I meant by the compiler. |
gabrielschulhof commented Jul 29, 2020
I believe this is blocked by #773. |
fe30826 to c1cdb39Comparegabrielschulhof commented Jul 30, 2020
Rebased on top of #773. I had to change the child process to examine the exception in the process' |
c1cdb39 to db0af19Compare
mhdawson left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
gabrielschulhof commented Jul 30, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
gabrielschulhof commented Aug 6, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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 <[email protected]> PR-URL: #762 Reviewed-By: Michael Dawson <[email protected]> test: add finalizer exception test src: wrap finalizer callback
gabrielschulhof commented Aug 6, 2020
Landed in cec2c76. |
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 <[email protected]> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <[email protected]> test: add finalizer exception test src: wrap finalizer callback
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 <[email protected]> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <[email protected]> test: add finalizer exception test src: wrap finalizer callback
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 <[email protected]> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <[email protected]> test: add finalizer exception test src: wrap finalizer callback
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 <[email protected]> PR-URL: nodejs/node-addon-api#762 Reviewed-By: Michael Dawson <[email protected]> test: add finalizer exception test src: wrap finalizer callback
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.