Browse Source

n-api: remove compiler warning

`TryCatch` without an `Isolate*` argument is deprecated, so add one.

PR-URL: https://github.com/nodejs/node/pull/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>
v6
Anna Henningsen 8 years ago
committed by Michael Dawson
parent
commit
008301167e
  1. 2
      src/node_api.cc

2
src/node_api.cc

@ -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);

Loading…
Cancel
Save