Uh oh!
There was an error while loading. Please reload this page.
scopes: make failure of closing scopes fatal - #566
Conversation
But not ignoring these failures.
mhdawson
commented
Oct 17, 2019
Can you give some context on how this would affect existing code. For example, is it going to fail out already just with a poorer stack trace/info or is this potentially going to break some existing code? |
legendecas
commented
Oct 17, 2019
I don't think it would affect the existing working code. Yet it would be helpful to debug possibly misusage of Value doubleCloseScope(const CallbackInfo& info) {
Env env = info.Env();
HandleScope scope(env);
HandleScope scope2 = scope; // this one would be closed with status `napi_handle_scope_mismatch` silentlyreturn env.Undefined();
} |
mhdawson
commented
Oct 18, 2019
@gabrielschulhof if you agree it's unlikely to affect working code I'm ok with it. |
Discussion in N-API team meeting today was that this is directly related to #565. We don't believe that the close should fail except for the case where it had been copied which will no longer be possible. |
mhdawson
commented
Oct 21, 2019
We did discuss and this should land as a SemVer major even though it should not affect any existing code. |
Properly handle failures instead of ignoring them. PR-URL: #566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
mhdawson
commented
Oct 23, 2019
Landed as ce139a0 |
PR-URL: #566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Properly handle failures instead of ignoring them. PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Properly handle failures instead of ignoring them. PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Properly handle failures instead of ignoring them. PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Properly handle failures instead of ignoring them. PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
PR-URL: nodejs/node-addon-api#566 Reviewed-By: NickNaso <nicoladelgobbo@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
But not ignoring these failures.