Commit 63356df
src,http: fix uncaughtException miss in http
In AsyncWrap::MakeCallback always return empty handle if there is an
error. In the future this should change to return a v8::MaybeLocal, but
that major change will have to wait for v6.x, and these changes are
meant to be backported to v4.x.
The HTTParser call to AsyncWrap::MakeCallback failed because it expected
a thrown call to return an empty handle.
In node::MakeCallback return an empty handle if the call is
in_makecallback(), otherwise return v8::Undefined() as usual to preserve
backwards compatibility.
Ref: #7048
Fixes: #5555
PR-URL: #5591
Reviewed-By: Julien Gilli <jgilli@nodejs.org>1 parent 6f312b3 commit 63356dfCopy full SHA for 63356df
File tree
Expand file treeCollapse file tree
3 files changed
+31
-4
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
3 files changed
+31
-4
lines changedOpen diff view settings
Collapse file
+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
193 | 193 | |
194 | 194 | |
195 | 195 | |
196 | | - |
| 196 | + |
197 | 197 | |
198 | 198 | |
199 | 199 | |
| ||
220 | 220 | |
221 | 221 | |
222 | 222 | |
223 | | - |
| 223 | + |
224 | 224 | |
225 | 225 | |
226 | 226 | |
| ||
249 | 249 | |
250 | 250 | |
251 | 251 | |
252 | | - |
| 252 | + |
253 | 253 | |
254 | 254 | |
255 | 255 | |
|
Collapse file
+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1177 | 1177 | |
1178 | 1178 | |
1179 | 1179 | |
1180 | | - |
| 1180 | + |
| 1181 | + |
| 1182 | + |
| 1183 | + |
| 1184 | + |
1181 | 1185 | |
1182 | 1186 | |
1183 | 1187 | |
|
Collapse file
test/parallel/test-http-catch-uncaughtexception.js
Copy file name to clipboard+23Lines changed: 23 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 | + |
0 commit comments