Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n-api,test: remove superfluous persistent #20299

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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