src: do not leak handles on debug and exit
authorFedor Indutny <fedor@indutny.com>
Thu, 12 Mar 2015 21:19:16 +0000 (14:19 -0700)
committerFedor Indutny <fedor@indutny.com>
Thu, 12 Mar 2015 21:29:50 +0000 (14:29 -0700)
commite2c9040995a13704f07ae36728818500c9091689
tree5cad3d13ba5ef9fbbaf1d81407d9692cc034c6fd
parent8c4f0df464b82b424bc5f88ee9ece040c0f71581
src: do not leak handles on debug and exit

Ensure HandleScope is created before creating any new handles (which
`Context::Scope` and `Environment::GetCurrent` does).

PR-URL: https://github.com/iojs/io.js/pull/1133
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
src/node.cc