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 <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
  • 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
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.