http_parser: do not dealloc during kOnExecute
authorFedor Indutny <fedor@indutny.com>
Fri, 18 Sep 2015 19:15:39 +0000 (12:15 -0700)
committerJeremiah Senkpiel <fishrock123@rocketmail.com>
Sun, 20 Sep 2015 17:31:27 +0000 (10:31 -0700)
commitbc9f62938771ef3665032af08265451310736d6e
treef469237d8abb368ff31babd52ed39d3e4963c785
parentf7edbab367d02b4cd2dc31ce9c0b3617ac61ff5b
http_parser: do not dealloc during kOnExecute

`freeParser` deallocates `Parser` instances early if they do not fit
into the free list. This does not play well with recent socket
consumption change, because it will try to deallocate the parser while
executing on its stack.

Regression was introduced in: 1bc4468

Fix: https://github.com/nodejs/node/issues/2928
PR-URL: https://github.com/nodejs/node/pull/2956
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
src/node_http_parser.cc
test/parallel/test-http-regr-gh-2928.js [new file with mode: 0644]