Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4cc84c9

Browse filesBrowse files
JeetuSutharaduh95
authored andcommitted
node-api: make napi_delete_reference use node_api_basic_env
PR-URL: #59684 Refs: #59583 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
1 parent 16c4b46 commit 4cc84c9
Copy full SHA for 4cc84c9

File tree

Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎src/js_native_api.h‎

Copy file name to clipboardExpand all lines: src/js_native_api.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ napi_create_reference(napi_env env,
352352

353353
// Deletes a reference. The referenced value is released, and may
354354
// be GC'd unless there are other references to it.
355-
NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(napi_env env,
355+
NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(node_api_basic_env env,
356356
napi_ref ref);
357357

358358
// Increments the reference count, optionally returning the resulting count.
Collapse file

‎src/js_native_api_v8.cc‎

Copy file name to clipboardExpand all lines: src/js_native_api_v8.cc
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,8 @@ napi_status NAPI_CDECL napi_create_reference(napi_env env,
27712771
// there are other references to it.
27722772
// For a napi_reference returned from `napi_wrap`, this must be called in the
27732773
// finalizer.
2774-
napi_status NAPI_CDECL napi_delete_reference(napi_env env, napi_ref ref) {
2774+
napi_status NAPI_CDECL napi_delete_reference(node_api_basic_env env,
2775+
napi_ref ref) {
27752776
// Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
27762777
// JS exceptions.
27772778
CHECK_ENV(env);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.