vm: fix crash on fatal error in debug context
authorBen Noordhuis <info@bnoordhuis.nl>
Sat, 21 Mar 2015 12:41:16 +0000 (13:41 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Sun, 22 Mar 2015 19:07:49 +0000 (20:07 +0100)
commitcf081a471205345abeebc5ee06ed02493c6dbdf1
tree470654d54eb41959b1493d096f2852e8aa0a2171
parentd8f383ba3fced3c2ed9135f476bd39082fef45a3
vm: fix crash on fatal error in debug context

Ensure that the debug context has an Environment assigned in case
a fatal error is raised.

The fatal exception handler in node.cc is not equipped to deal with
contexts that don't have one and can't easily be taught that due to
a deficiency in the V8 API: there is no way for the embedder to tell
if the data index is in use.

Fixes: https://github.com/iojs/io.js/issues/1190
PR-URL: https://github.com/iojs/io.js/pull/1229
Reviewed-By: Fedor Indutny <fedor@indutny.com>
src/env.h
src/node_contextify.cc
test/fixtures/vm-run-in-debug-context.js [new file with mode: 0644]
test/parallel/test-vm-debug-context.js