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.

Backport-PR-URL: #19447
PR-URL: #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 MylesBorins committed Apr 16, 2018
1 parent 314f22d commit 8d3162d
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 @@ -2783,7 +2783,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 8d3162d

Please sign in to comment.