node/test
Myles Borins 1b070e48e0 node_contextify: do not incept debug context
Currently a debug context is created for various calls to util.

If the node debugger is being run the main context is the debug
context. In this case node_contextify was freeing the debug context
and causing everything to explode.

This change moves around the logic and no longer frees the context.

There is a concern about the dangling pointer

The regression test was adapted from code submitted by @3y3 in #4815

Fixes: https://github.com/nodejs/node/issues/4440
Fixes: https://github.com/nodejs/node/issues/4815
Fixes: https://github.com/nodejs/node/issues/4597
Fixes: https://github.com/nodejs/node/issues/4952

PR-URL: https://github.com/nodejs/node/issues/4815

Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-02-15 11:30:23 -08:00
..
abort src: honor --abort_on_uncaught_exception flag 2015-09-20 10:30:52 -07:00
addons test: remove unused vars 2016-01-19 11:52:39 -08:00
cctest deps: check in gtest, add util unit test 2015-04-01 22:35:56 +02:00
debugger test: fix style issues after eslint update 2016-02-15 11:30:23 -08:00
disabled test: replace deprecated util.debug() calls 2015-09-30 22:19:52 +10:00
fixtures node_contextify: do not incept debug context 2016-02-15 11:30:23 -08:00
gc test: only include http module once 2016-02-15 11:30:23 -08:00
internet test: fix style issues after eslint update 2016-02-15 11:30:23 -08:00
message test: remove unused modules 2016-01-19 11:52:39 -08:00
parallel node_contextify: do not incept debug context 2016-02-15 11:30:23 -08:00
pummel test: fix issues for space-in-parens ESLint rule 2016-02-15 11:30:23 -08:00
sequential test: improve test-cluster-disconnect-suicide-race 2016-02-15 11:30:23 -08:00
testpy test: fix default value for additional param 2015-09-15 13:53:37 -04:00
timers test: remove unused vars 2016-01-19 11:52:39 -08:00
.eslintrc test: make common.js mandatory via linting rule 2015-10-07 20:39:17 -07:00
common.js test: fix style issues after eslint update 2016-02-15 11:30:23 -08:00