js_stream: prevent abort if isalive doesn't exist
authorTrevor Norris <trev.norris@gmail.com>
Thu, 8 Oct 2015 16:57:12 +0000 (10:57 -0600)
committerTrevor Norris <trev.norris@gmail.com>
Thu, 8 Oct 2015 17:51:15 +0000 (11:51 -0600)
commit1850879b0e6d5e1e52e35790ab448c4c6dee34f0
tree02ce41444fb5551cda793b6bf3745536f744ba54
parent26a7ec69603d847b2dbab6cdb072499ebee775de
js_stream: prevent abort if isalive doesn't exist

Attempting to check IsAlive() on a JSStream before the isAlive()
callback can be set in JS causes a CHECK to fail in MakeCallback.
Instead return false if the callback hasn't been set.

PR-URL: https://github.com/nodejs/node/pull/3282
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
src/js_stream.cc
test/parallel/test-js-stream-call-properties.js [new file with mode: 0644]