Skip to content

Commit

Permalink
n-api: remove compiler warning
Browse files Browse the repository at this point in the history
`TryCatch` without an `Isolate*` argument is deprecated, so add one.

PR-URL: nodejs#13014
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
  • Loading branch information
addaleax authored and Olivier Martin committed May 19, 2017
1 parent 223c992 commit b9fa3fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2781,7 +2781,7 @@ class Work {
// report it as a fatal exception. (There is no JavaScript on the
// callstack that can possibly handle it.)
if (!env->last_exception.IsEmpty()) {
v8::TryCatch try_catch;
v8::TryCatch try_catch(env->isolate);
env->isolate->ThrowException(
v8::Local<v8::Value>::New(env->isolate, env->last_exception));
node::FatalException(env->isolate, try_catch);
Expand Down

0 comments on commit b9fa3fe

Please sign in to comment.