Skip to content

Commit

Permalink
n-api: Revert change to napi_wrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin committed Aug 7, 2017
1 parent 4acfd8f commit bfb88a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit bfb88a3

Please sign in to comment.