Uh oh!
There was an error while loading. Please reload this page.
create a HandleScope in FinalizeCallback - #832
Conversation
blagoev
commented
Nov 17, 2020
seems like clang-format fails on the whole |
mhdawson
commented
Nov 18, 2020
@blagoev could you add the stack trace to the issue? It would be good to understand the path that leads to the case where there is no HandleScope already on the stack. |
gabrielschulhof
commented
Nov 19, 2020
@mhdawson I think this needs to be fixed in core. This fix is certainly not incorrect, but @KevinEady's backtraces in #742 indicate that there is no handle scope when the |
gabrielschulhof
commented
Nov 19, 2020
@mhdawson nevermind. This was fixed in core (nodejs/node#34366) in RunAndClearNativeImmediates, which is part of @KevinEady's stack. |
gabrielschulhof
left a comment
There was a problem hiding this comment.
We need this for older versions of Node.js 👍
blagoev
commented
Nov 19, 2020
yes I can confirm the crash was happening when closing the application which might be where |
mhdawson
commented
Nov 20, 2020
I think this is just missing #819 in terms of the lint checks. As far as I can see it passes in my environment. Going to land. |
Refs: #832 Seems like FinalizeCallback needs to create a HandleScope since it calls ObjectWrap::~ObjectWrap() which might need to create a temporary Object handle here https://github.com/nodejs/node-addon-api/blob/master/napi-inl.h#L3558 at Realm (https://github.com/realm/realm-js) we have crashes with stacktrace at this location. While fixed in core for later versions we still need for older versions of Node.js PR-URL: #832 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kevin Eady <kevin.c.eady@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
mhdawson
commented
Nov 20, 2020
Landed as 1427b3e |
Refs: nodejs/node-addon-api#832 Seems like FinalizeCallback needs to create a HandleScope since it calls ObjectWrap::~ObjectWrap() which might need to create a temporary Object handle here https://github.com/nodejs/node-addon-api/blob/master/napi-inl.h#L3558 at Realm (https://github.com/realm/realm-js) we have crashes with stacktrace at this location. While fixed in core for later versions we still need for older versions of Node.js PR-URL: nodejs/node-addon-api#832 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kevin Eady <kevin.c.eady@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
Refs: nodejs/node-addon-api#832 Seems like FinalizeCallback needs to create a HandleScope since it calls ObjectWrap::~ObjectWrap() which might need to create a temporary Object handle here https://github.com/nodejs/node-addon-api/blob/master/napi-inl.h#L3558 at Realm (https://github.com/realm/realm-js) we have crashes with stacktrace at this location. While fixed in core for later versions we still need for older versions of Node.js PR-URL: nodejs/node-addon-api#832 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kevin Eady <kevin.c.eady@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
Refs: nodejs/node-addon-api#832 Seems like FinalizeCallback needs to create a HandleScope since it calls ObjectWrap::~ObjectWrap() which might need to create a temporary Object handle here https://github.com/nodejs/node-addon-api/blob/master/napi-inl.h#L3558 at Realm (https://github.com/realm/realm-js) we have crashes with stacktrace at this location. While fixed in core for later versions we still need for older versions of Node.js PR-URL: nodejs/node-addon-api#832 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kevin Eady <kevin.c.eady@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
Refs: nodejs/node-addon-api#832 Seems like FinalizeCallback needs to create a HandleScope since it calls ObjectWrap::~ObjectWrap() which might need to create a temporary Object handle here https://github.com/nodejs/node-addon-api/blob/master/napi-inl.h#L3558 at Realm (https://github.com/realm/realm-js) we have crashes with stacktrace at this location. While fixed in core for later versions we still need for older versions of Node.js PR-URL: nodejs/node-addon-api#832 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kevin Eady <kevin.c.eady@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
Seems like FinalizeCallback needs to create a HandleScope since it calls ObjectWrap::~ObjectWrap() which might need to create a temporary Object handle here https://github.com/nodejs/node-addon-api/blob/master/napi-inl.h#L3558
at Realm (https://github.com/realm/realm-js) we have crashes with stacktrace at this location.