Commit 496f7ea
node-api: fix shutdown crashes
Refs: nodejs/node-addon-api#906
Ensure that finalization is not defered during shutdown.
The env for the addon is deleted immediately after
iterating the list of finalizers to be run. Defering
causes crashes as the finalization uses the already
deleted env.
Signed-off-by: Michael Dawson <mdawson@devrus.com>
PR-URL: #38492
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com>1 parent 6da4aa3 commit 496f7eaCopy full SHA for 496f7ea
File tree
Expand file treeCollapse file tree
2 files changed
+38
-2
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
2 files changed
+38
-2
lines changedOpen diff view settings
Collapse file
+31Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
122 | 122 | |
123 | 123 | |
124 | 124 | |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
125 | 156 | |
126 | 157 | |
127 | 158 | |
|
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | | - |
43 | | - |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
44 | 49 | |
45 | 50 | |
46 | 51 | |
|
0 commit comments