Commit 727ffe4
domain: use strong reference to domain while active
When an uncaught exception is thrown inside a domain, the domain is
removed from the stack as of 43a5170.
This means that it might not be kept alive as an object anymore,
and may be garbage collected before the `after()` hook can run,
which tries to exit it as well.
Resolve that by making references to the domain strong while it is
active.
Fixes: #28275
PR-URL: #28313
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent ae56a23 commit 727ffe4Copy full SHA for 727ffe4
File tree
Expand file treeCollapse file tree
3 files changed
+25
-1
lines changedOpen diff view settings
Filter options
- lib
- src
- test/parallel
Expand file treeCollapse file tree
3 files changed
+25
-1
lines changedOpen diff view settings
Collapse file
+6-1Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
73 | 73 | |
74 | 74 | |
75 | 75 | |
| 76 | + |
| 77 | + |
| 78 | + |
76 | 79 | |
77 | 80 | |
78 | 81 | |
79 | 82 | |
80 | 83 | |
81 | 84 | |
82 | | - |
| 85 | + |
| 86 | + |
| 87 | + |
83 | 88 | |
84 | 89 | |
85 | 90 | |
|
Collapse file
+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
189 | 189 | |
190 | 190 | |
191 | 191 | |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
192 | 205 | |
193 | 206 | |
194 | 207 | |
195 | 208 | |
196 | 209 | |
197 | 210 | |
| 211 | + |
198 | 212 | |
199 | 213 | |
200 | 214 | |
| ||
294 | 308 | |
295 | 309 | |
296 | 310 | |
| 311 | + |
| 312 | + |
297 | 313 | |
298 | 314 | |
299 | 315 | |
|
Collapse file
test/parallel/test-domain-error-types.js
Copy file name to clipboardExpand all lines: test/parallel/test-domain-error-types.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
1 | 2 | |
2 | 3 | |
3 | 4 | |
| ||
6 | 7 | |
7 | 8 | |
8 | 9 | |
| 10 | + |
| 11 | + |
9 | 12 | |
10 | 13 | |
11 | 14 | |
|
0 commit comments