mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
cf081a4712
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>
5 lines
146 B
JavaScript
5 lines
146 B
JavaScript
if (process.argv[2] === 'handle-fatal-exception')
|
|
process._fatalException = process.exit.bind(null, 42);
|
|
|
|
require('vm').runInDebugContext('*');
|