process: support symbol events
authorcjihrig <cjihrig@gmail.com>
Thu, 21 Jan 2016 18:07:25 +0000 (13:07 -0500)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
commitd7e9bb7bdefee04ccaff3f9ab89124ef4b966879
treedd770bc1d4fe79d7ff2b0a42e9c62dbb8fc2c0f2
parentcb09203a657fbdd5ac2692b65a029b30e76cb67d
process: support symbol events

Event emitters support symbols as event names. The process object
assumes that the event name is a string, and examines the first
three characters to check for signals. This causes an exception
if the event name is a symbol. This commit ensures that the
event name is a string before trying to slice() it.

PR-URL: https://github.com/nodejs/node/pull/4798
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
src/node.js
test/parallel/test-process-emit.js [new file with mode: 0644]