diff options
author | Myles Borins <mborins@us.ibm.com> | 2016-02-01 11:13:31 -0800 |
---|---|---|
committer | Myles Borins <mborins@us.ibm.com> | 2016-02-05 15:40:56 -0800 |
commit | 4897f94ec67ed35cfd382bbb0bce78ea91738428 (patch) | |
tree | e24558342f8f5dbd2765c9011d55dd61e19ff366 /test/fixtures/debugger-util-regression-fixture.js | |
parent | 878bcd43f8f9d3ec0d3403cb1bbe1ba6201a6d84 (diff) | |
download | android-node-v8-4897f94ec67ed35cfd382bbb0bce78ea91738428.tar.gz android-node-v8-4897f94ec67ed35cfd382bbb0bce78ea91738428.tar.bz2 android-node-v8-4897f94ec67ed35cfd382bbb0bce78ea91738428.zip |
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>
Diffstat (limited to 'test/fixtures/debugger-util-regression-fixture.js')
-rw-r--r-- | test/fixtures/debugger-util-regression-fixture.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/fixtures/debugger-util-regression-fixture.js b/test/fixtures/debugger-util-regression-fixture.js new file mode 100644 index 0000000000..d397f3d641 --- /dev/null +++ b/test/fixtures/debugger-util-regression-fixture.js @@ -0,0 +1,4 @@ +'use strict'; +const util = require('util'); +const payload = util.inspect({a: 'b'}); +console.log(payload); |