Skip to content

Commit

Permalink
n-api,test: remove superfluous persistent
Browse files Browse the repository at this point in the history
Remove a superfluos persistent from test_constructor_name.c.

PR-URL: #20299
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
Gabriel Schulhof authored and MylesBorins committed May 4, 2018
1 parent 8d24b6e commit b5c1c14
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/addons-napi/test_constructor/test_constructor_name.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include <node_api.h>
#include "../common.h"

napi_ref constructor_;

static napi_value New(napi_env env, napi_callback_info info) {
napi_value _this;
NAPI_CALL(env, napi_get_cb_info(env, info, NULL, NULL, &_this, NULL));
Expand All @@ -14,9 +12,6 @@ static napi_value Init(napi_env env, napi_value exports) {
napi_value cons;
NAPI_CALL(env, napi_define_class(
env, "MyObject_Extra", 8, New, NULL, 0, NULL, &cons));

NAPI_CALL(env,
napi_create_reference(env, cons, 1, &constructor_));
return cons;
}

Expand Down

0 comments on commit b5c1c14

Please sign in to comment.