Skip to content

Commit b5c1c14

Browse files
Gabriel SchulhofMylesBorins
Gabriel Schulhof
authored andcommitted
n-api,test: remove superfluous persistent
Remove a superfluos persistent from test_constructor_name.c. PR-URL: #20299 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 8d24b6e commit b5c1c14

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

test/addons-napi/test_constructor/test_constructor_name.c

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include <node_api.h>
22
#include "../common.h"
33

4-
napi_ref constructor_;
5-
64
static napi_value New(napi_env env, napi_callback_info info) {
75
napi_value _this;
86
NAPI_CALL(env, napi_get_cb_info(env, info, NULL, NULL, &_this, NULL));
@@ -14,9 +12,6 @@ static napi_value Init(napi_env env, napi_value exports) {
1412
napi_value cons;
1513
NAPI_CALL(env, napi_define_class(
1614
env, "MyObject_Extra", 8, New, NULL, 0, NULL, &cons));
17-
18-
NAPI_CALL(env,
19-
napi_create_reference(env, cons, 1, &constructor_));
2015
return cons;
2116
}
2217

0 commit comments

Comments
 (0)