Commit 700f766
process: ignore asyncId 0 in exception handler
Today, the global uncaught exception handler is the only
place where asyncId 0 is not ignored and we still proceed
to call emitAfter. This would've already failed one of
our correctness tests in async_hooks if not for some other
code meant to handle a different edge case.
Fixes: #22982
PR-URL: #41424
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 8681c83 commit 700f766Copy full SHA for 700f766
File tree
Expand file treeCollapse file tree
3 files changed
+24
-5
lines changedOpen diff view settings
Filter options
- lib/internal/process
- test/async-hooks
Expand file treeCollapse file tree
3 files changed
+24
-5
lines changedOpen diff view settings
Collapse file
lib/internal/process/execution.js
Copy file name to clipboardExpand all lines: lib/internal/process/execution.js+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
| 23 | + |
| 24 | + |
24 | 25 | |
25 | 26 | |
26 | 27 | |
| ||
183 | 184 | |
184 | 185 | |
185 | 186 | |
186 | | - |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
187 | 192 | |
188 | 193 | |
189 | 194 | |
|
Collapse file
test/async-hooks/init-hooks.js
Copy file name to clipboardExpand all lines: test/async-hooks/init-hooks.js-3Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
168 | 168 | |
169 | 169 | |
170 | 170 | |
171 | | - |
172 | | - |
173 | | - |
174 | 171 | |
175 | 172 | |
176 | 173 | |
|
Collapse file
test/async-hooks/test-unhandled-exception-valid-ids.js
Copy file name to clipboard+17Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
0 commit comments