Commit a854bb3
node-api: create reference only when needed
Optimize napi_create_external() to create the reference for calling
finalizer only if user actually provides a finalizer callback.
PR-URL: #44827
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent dc2af26 commit a854bb3
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2387 | 2387 | | |
2388 | 2388 | | |
2389 | 2389 | | |
2390 | | - | |
2391 | | - | |
2392 | | - | |
2393 | | - | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
2394 | 2396 | | |
2395 | 2397 | | |
2396 | 2398 | | |
| |||
0 commit comments