Commit d0f1ff5
async_hooks: set unhandledRejection async context
This commit now executes `process.on('unhandledRejection')` in the
async execution context of the concerned `Promise`.
PR-URL: #37281
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent 1fc8307 commit d0f1ff5Copy full SHA for d0f1ff5
File tree
Expand file treeCollapse file tree
5 files changed
+130
-11
lines changedOpen diff view settings
Filter options
- lib/internal
- process
- src
- test
- async-hooks
- parallel
Expand file treeCollapse file tree
5 files changed
+130
-11
lines changedOpen diff view settings
Collapse file
lib/internal/async_hooks.js
Copy file name to clipboardExpand all lines: lib/internal/async_hooks.js+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
573 | 573 | |
574 | 574 | |
575 | 575 | |
| 576 | + |
| 577 | + |
576 | 578 | |
577 | 579 | |
578 | 580 | |
|
Collapse file
lib/internal/process/promises.js
Copy file name to clipboardExpand all lines: lib/internal/process/promises.js+26-8Lines changed: 26 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
27 | 33 | |
28 | 34 | |
29 | 35 | |
| ||
116 | 122 | |
117 | 123 | |
118 | 124 | |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
119 | 141 | |
120 | 142 | |
121 | 143 | |
122 | 144 | |
123 | | - |
| 145 | + |
| 146 | + |
124 | 147 | |
125 | 148 | |
126 | 149 | |
| ||
194 | 217 | |
195 | 218 | |
196 | 219 | |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
201 | | - |
202 | | - |
203 | | - |
| 220 | + |
| 221 | + |
204 | 222 | |
205 | 223 | |
206 | 224 | |
|
Collapse file
+74-3Lines changed: 74 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
1 | 2 | |
2 | 3 | |
3 | 4 | |
| ||
16 | 17 | |
17 | 18 | |
18 | 19 | |
| 20 | + |
19 | 21 | |
20 | 22 | |
21 | 23 | |
22 | 24 | |
23 | 25 | |
| 26 | + |
24 | 27 | |
25 | 28 | |
26 | 29 | |
27 | 30 | |
28 | 31 | |
29 | 32 | |
30 | 33 | |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
31 | 68 | |
32 | 69 | |
33 | 70 | |
| ||
76 | 113 | |
77 | 114 | |
78 | 115 | |
79 | | - |
80 | | - |
81 | | - |
| 116 | + |
| 117 | + |
82 | 118 | |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
83 | 142 | |
84 | 143 | |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
85 | 156 | |
86 | 157 | |
87 | 158 | |
|
Collapse file
test/async-hooks/test-unhandled-rejection-context.js
Copy file name to clipboard+27Lines changed: 27 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 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
Collapse file
test/parallel/test-bootstrap-modules.js
Copy file name to clipboardExpand all lines: test/parallel/test-bootstrap-modules.js+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
102 | 102 | |
103 | 103 | |
104 | 104 | |
| 105 | + |
105 | 106 | |
106 | 107 | |
107 | 108 | |
|
0 commit comments