Skip to content

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.

Follow up from https://github.com/nodejs/node/pull/5571 where was decided patch would land on master first.

R=@misterdjules R=@indutny R=@TheAlphaNerd

CI: https://ci.nodejs.org/job/node-test-pull-request/1876/

Merge request reports

Loading