From bfb88a3e48d4f87ee1b655ae449172a6a4e54b46 Mon Sep 17 00:00:00 2001 From: Jason Ginchereau Date: Mon, 7 Aug 2017 13:53:50 -0700 Subject: [PATCH] n-api: Revert change to napi_wrap() --- src/node_api.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_api.cc b/src/node_api.cc index cabc6767fc8826..54bdbf21163fda 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -2251,7 +2251,7 @@ napi_status napi_wrap(napi_env env, napi_finalize finalize_cb, void* finalize_hint, napi_ref* result) { - CHECK_ENV(env); + NAPI_PREAMBLE(env); CHECK_ARG(env, js_object); v8::Isolate* isolate = env->isolate; @@ -2299,7 +2299,7 @@ napi_status napi_wrap(napi_env env, env, obj, 0, true, finalize_cb, native_object, finalize_hint); } - return napi_clear_last_error(env); + return GET_RETURN_STATUS(env); } napi_status napi_unwrap(napi_env env, napi_value js_object, void** result) {