Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
test: verify napi_remove_wrap with napi_delete_reference
Verify that napi_remove_wrap and napi_delete_reference should be safe to be called consecutively on the in-out params of napi_wrap. PR-URL: #44754 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
- Loading branch information
1 parent
daf63d2
commit 3112d5dae07f79bac86d22495f274ff9d661655c
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
|
||
// This test makes no assertions. It tests that calling napi_remove_wrap and | ||
// napi_delete_reference consecutively doesn't crash the process. | ||
|
||
const { buildType } = require('../../common'); | ||
|
||
const addon = require(`./build/${buildType}/test_reference_double_free`); | ||
|
||
addon.deleteImmediately({}); |