Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.4.0 propose #4547

Merged
merged 99 commits into from
Jan 6, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
699bf2c
doc: fix link in addons.markdown
secretfader Dec 17, 2015
5ce6e99
doc: Typo in buffer.markdown referencing buf.write()
chrisJohn404 Dec 17, 2015
04dd861
doc: fix, modernize examples in docs
jasnell Dec 14, 2015
b841967
http: Remove an unnecessary assignment
gigabo Dec 17, 2015
a5094a3
debugger: guard against call from non-node context
bnoordhuis Dec 17, 2015
96501e5
test: try other ipv6 localhost alternatives
mscdex Dec 17, 2015
8464667
node: fix erroneously named function call
trevnorris Nov 10, 2015
b8366e7
http_parser: use pushValueToArray for headers
trevnorris Nov 10, 2015
e742422
fs: use pushValueToArray for readdir(Sync)
trevnorris Nov 10, 2015
c8fc217
node: improve GetActiveHandles performance
trevnorris Nov 11, 2015
89f056b
node: improve performance of hrtime()
trevnorris Nov 11, 2015
ecef817
node: improve accessor perf of process.env
trevnorris Nov 11, 2015
fcf632b
crypto: load PFX chain the same way as regular one
indutny Dec 5, 2015
82f74ca
test: fix flaky test-net-error-twice
mscdex Dec 18, 2015
d11930d
repl: use String#repeat instead of Array#join
evanlucas Nov 18, 2015
d265fc8
assert: typed array deepequal performance fix
claudiorodriguez Dec 17, 2015
8f7af9a
http: remove excess calls to removeSocket
Dec 6, 2015
3d41a44
repl: Fixed node repl history edge case.
zeusdeux Dec 1, 2015
ca97e72
https: use `servername` in agent key
indutny Dec 22, 2015
6d14b65
test: use platformTimeout() in more places
mscdex Dec 22, 2015
00b37de
test: fix domain-top-level-error-handler-throw
santigimeno Dec 20, 2015
57684d6
doc: improve addons.markdown copy
jasnell Dec 17, 2015
474a0f0
doc: improvements to buffer.markdown copy
jasnell Dec 20, 2015
8781c59
buffer: refactor create buffer
JacksonTian Dec 18, 2015
6d8053a
buffer: faster case for create Buffer from new Buffer(0)
JacksonTian Dec 17, 2015
6450d86
doc: improve grammar in tls docs
AdriVanHoudt Dec 16, 2015
c77fd68
http: 451 status code "Unavailable For Legal Reasons"
mbarinov Dec 21, 2015
71b79bc
test: test each block in addon.md contains js & cc
rvagg Dec 24, 2015
e79eda7
doc: copyedit releases.md
Trott Dec 21, 2015
8742090
test: fix http-response-multiheaders
santigimeno Nov 21, 2015
8c9d0c1
test: refactor test-net-connect-options-ipv6
Trott Dec 23, 2015
b5aaccc
lib: remove unused modules
Trott Dec 23, 2015
3710028
test: remove unused `util` imports
Trott Dec 23, 2015
65c40d7
repl: remove unused function
Trott Dec 23, 2015
0799a9a
test: remove unused var from test-assert.js
Trott Dec 23, 2015
cd79ec2
test: remove unnecessary assignments
Trott Dec 24, 2015
2526282
child_process: guard against race condition
Trott Dec 24, 2015
c639d0f
test: mark test-debug-no-context is flaky
Trott Dec 25, 2015
c835ba3
doc: improve assert.markdown copy
jasnell Dec 20, 2015
bc1c0dc
doc: catch the WORKING_GROUPS.md bootstrap docs up to date
jasnell Dec 20, 2015
c36ca37
test: remove unused variables form http tests
Trott Dec 25, 2015
585c01f
test: remove unused variables from TLS tests
Trott Dec 26, 2015
684eb32
test: remove unused variables from HTTPS tests
Trott Dec 26, 2015
03c4bc7
test: fix flaky child-process-fork-regr-gh-2847
mscdex Dec 27, 2015
715afc9
test: fix flaky cluster-net-send
mscdex Dec 28, 2015
e72112f
test: fix flaky cluster-disconnect-race
mscdex Dec 28, 2015
54004f0
test: remove unused vars in ChildProcess tests
Trott Dec 26, 2015
c6a99dd
test: remove unused variables from net tests
Trott Dec 26, 2015
14a947f
tools: run tick processor without forking
Dec 9, 2015
9e66735
doc: fix formatting in process.markdown
Trott Dec 27, 2015
b19d19e
test: extend timeout in Debug mode
Trott Dec 26, 2015
150f628
doc: copyedit setTimeout() documentation
Trott Dec 27, 2015
55c6946
test: make temp path customizable
jbergstroem Oct 12, 2015
5110e4d
test: don't assume a certain folder structure
jbergstroem Dec 30, 2015
ba24450
test: don't use cwd for relative path
jbergstroem Dec 30, 2015
ffb4a6e
http: fix non-string header value concatenation
mscdex Dec 28, 2015
c1bc9a1
doc: improve child_process.markdown copy
jasnell Dec 21, 2015
e177cc9
doc: improvements to console.markdown copy
jasnell Dec 26, 2015
ed15962
doc: improvements to dns.markdown copy
jasnell Dec 27, 2015
ccd75fe
doc: improvements to events.markdown copy
jasnell Dec 29, 2015
083ae16
http: use `self.keepAlive` instead of `self.options.keepAlive`
dschenkelman Dec 23, 2015
e8bbeec
doc: improvements to debugger.markdown copy
jasnell Dec 27, 2015
ec0b636
test: remove unused assert module imports
Trott Dec 27, 2015
f68f86c
test: fix race condition in test-http-client-onerror
dnakamura Dec 18, 2015
5a223d6
doc: add anchors for _transform _flush _writev in stream.markdown
iamchenxin Dec 28, 2015
8039ca0
util: faster arrayToHash
JacksonTian Nov 22, 2015
40076bf
doc: fix spelling error in lib/url.js comment
nikolas Dec 22, 2015
c745b4d
doc: explain ClientRequest#setTimeout time unit
bripkens Dec 28, 2015
eee5082
doc: mention that http.Server inherits from net.Server
ryansobol Dec 28, 2015
d46d850
test: shorten path for bogus socket
Trott Dec 30, 2015
921fb54
node: improve performance of process.hrtime()
evanlucas Dec 30, 2015
3bfc187
test: improve assert message
Trott Dec 29, 2015
08a3490
test: inherit JOBS from environment
jbergstroem Dec 31, 2015
f1a66bc
test: clarify role of domains in test
Trott Dec 31, 2015
06043fd
test: remove unused modules
Trott Dec 30, 2015
ab3e5c1
test: write to tmp dir rather than fixture dir
Trott Dec 30, 2015
02b3a5b
test: refactor test-fs-empty-readStream
Trott Dec 30, 2015
a703b1b
test: remove time check
Trott Dec 31, 2015
6c7bcd5
doc: fix website wg mislink
Dec 19, 2015
e57fd51
os: fix crash in GetInterfaceAddresses
martinbark Dec 14, 2015
69343d6
tls_wrap: clear errors on return
indutny Jan 3, 2016
6cdfa38
doc: improvements to errors.markdown copy
jasnell Dec 28, 2015
982f322
doc: improvements to dgram.markdown copy
jasnell Dec 27, 2015
e04a840
test: remove flaky designations for tests
Trott Jan 3, 2016
46fefbc
test: fix flaky test-http-agent-keepalive
Trott Jan 4, 2016
30b0d75
test: fix flaky streams test
Trott Jan 3, 2016
1dd2d01
http: handle errors on idle sockets
jfromaniello Dec 31, 2015
984db93
test: fix flaky test-cluster-shared-leak
Trott Jan 1, 2016
ae02466
test: remove unused vars from parallel tests
Trott Jan 2, 2016
2a69ab3
test: add test-domain-exit-dispose-again back
Dec 12, 2015
35aec4c
doc: fix numbering in stream.markdown
richardsun29 Jan 5, 2016
5be0259
doc: close backtick in process.title description
Jan 5, 2016
4b14f1c
test: remove unused vars
Trott Dec 27, 2015
386030b
tools: implement no-unused-vars for eslint
Trott Dec 23, 2015
334e739
doc: fix heading level error in Buffer doc
Jan 5, 2016
ca9812c
tools: fix warning in doc parsing
Jan 5, 2016
4220d25
test: fix linting for the v5.x branch
Fishrock123 Jan 6, 2016
af591d4
2016-01-06, Version 5.4.0 (Stable)
Fishrock123 Jan 6, 2016
138e1e5
Working on v5.4.1
Fishrock123 Jan 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
debugger: guard against call from non-node context
Fix a segmentation fault when the debug message handler was called from
a context without an associated `node::Environment`.

Fixes: #4261
Fixes: #4322
PR-URL: #4328
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
bnoordhuis authored and Fishrock123 committed Jan 6, 2016
commit a5094a35a0ef416bc95aafb530e92a5aa78ee239
2 changes: 2 additions & 0 deletions src/debug-agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ void Agent::EnqueueMessage(AgentMessage* message) {
void Agent::MessageHandler(const v8::Debug::Message& message) {
Isolate* isolate = message.GetIsolate();
Environment* env = Environment::GetCurrent(isolate);
if (env == nullptr)
return; // Called from a non-node context.
Agent* a = env->debugger_agent();
CHECK_NE(a, nullptr);
CHECK_EQ(isolate, a->parent_env()->isolate());
Expand Down
24 changes: 24 additions & 0 deletions test/parallel/test-debug-no-context.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;

const args = [`--debug`, `--debug-port=${common.PORT}`, `--interactive`];
const proc = spawn(process.execPath, args, { stdio: 'pipe' });
proc.stdin.write(`
util.inspect(Promise.resolve(42));
util.inspect(Promise.resolve(1337));
.exit
`);
proc.on('exit', common.mustCall((exitCode, signalCode) => {
assert.strictEqual(exitCode, 0);
assert.strictEqual(signalCode, null);
}));
let stdout = '';
proc.stdout.setEncoding('utf8');
proc.stdout.on('data', data => stdout += data);
process.on('exit', () => {
assert(stdout.includes('Promise { 42 }'));
assert(stdout.includes('Promise { 1337 }'));
});