summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2015-10-08 10:57:12 -0600
committerTrevor Norris <trev.norris@gmail.com>2015-10-08 11:38:21 -0600
commit178ac3367f8ec21e69034e9d1bda39ddfe549b6d (patch)
tree8156b464f9b38dc89ffeb6943fba47ba374d4c8a /test
parentded4f91eeff478a22e4a0eb5ba2c7ce811512c64 (diff)
downloadnode-new-178ac3367f8ec21e69034e9d1bda39ddfe549b6d.tar.gz
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>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-js-stream-call-properties.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parallel/test-js-stream-call-properties.js b/test/parallel/test-js-stream-call-properties.js
new file mode 100644
index 0000000000..c6b1adb3cb
--- /dev/null
+++ b/test/parallel/test-js-stream-call-properties.js
@@ -0,0 +1,8 @@
+'use strict';
+
+const common = require('../common');
+const util = require('util');
+const JSStream = process.binding('js_stream').JSStream;
+
+// Testing if will abort when properties are printed.
+util.inspect(new JSStream());