File tree Expand file tree Collapse file tree
test/js-native-api/6_object_wrap Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #ifndef JS_NATIVE_API_6_OBJECT_WRAP_MYOBJECT_H_
2- #define JS_NATIVE_API_6_OBJECT_WRAP_MYOBJECT_H_
1+ #ifndef TEST_JS_NATIVE_API_6_OBJECT_WRAP_MYOBJECT_H_
2+ #define TEST_JS_NATIVE_API_6_OBJECT_WRAP_MYOBJECT_H_
33
44#include < js_native_api.h>
55
@@ -25,4 +25,4 @@ class MyObject {
2525 napi_ref wrapper_;
2626};
2727
28- #endif // JS_NATIVE_API_6_OBJECT_WRAP_MYOBJECT_H_
28+ #endif // TEST_JS_NATIVE_API_6_OBJECT_WRAP_MYOBJECT_H_
Original file line number Diff line number Diff line change 22#include " ../common.h"
33#include " ../entry_point.h"
44
5- napi_ref NestedWrap::constructor;
5+ napi_ref NestedWrap::constructor{} ;
66static int finalization_count = 0 ;
77
8- NestedWrap::NestedWrap () : env_( nullptr ), wrapper_( nullptr ), nested_( nullptr ) {}
8+ NestedWrap::NestedWrap () {}
99
1010NestedWrap::~NestedWrap () {
1111 napi_delete_reference (env_, wrapper_);
Original file line number Diff line number Diff line change 1- #ifndef JS_NATIVE_API_6_OBJECT_WRAP_NESTED_WRAP_H_
2- #define JS_NATIVE_API_6_OBJECT_WRAP_NESTED_WRAP_H_
1+ #ifndef TEST_JS_NATIVE_API_6_OBJECT_WRAP_NESTED_WRAP_H_
2+ #define TEST_JS_NATIVE_API_6_OBJECT_WRAP_NESTED_WRAP_H_
33
44#include < js_native_api.h>
55
@@ -25,9 +25,9 @@ class NestedWrap {
2525
2626 static napi_ref constructor;
2727
28- napi_env env_;
29- napi_ref wrapper_;
30- napi_ref nested_;
28+ napi_env env_{} ;
29+ napi_ref wrapper_{} ;
30+ napi_ref nested_{} ;
3131};
3232
33- #endif // JS_NATIVE_API_6_OBJECT_WRAP_NESTED_WRAP_H_
33+ #endif // TEST_JS_NATIVE_API_6_OBJECT_WRAP_NESTED_WRAP_H_
You can’t perform that action at this time.
0 commit comments