summaryrefslogtreecommitdiff
path: root/lib/child_process.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-12-21 12:17:23 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-12-21 12:17:23 -0800
commitf7f8af842077be4e6cc580ddedcccea71e073bbb (patch)
tree2c2a6a881cd3cbcf04b0f338afb1c942d33bbb19 /lib/child_process.js
parent4eaf4ce26a0e66179d199997d9e0290867557702 (diff)
parent73cf8e82e768af870964d6f3375ab758e774165c (diff)
downloadnode-new-f7f8af842077be4e6cc580ddedcccea71e073bbb.tar.gz
Merge remote branch 'origin/v0.6'
Conflicts: Makefile lib/_debugger.js
Diffstat (limited to 'lib/child_process.js')
-rw-r--r--lib/child_process.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/child_process.js b/lib/child_process.js
index 8bcfdf74a0..cef093a0b7 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -111,7 +111,11 @@ function setupChannel(target, channel) {
};
target.send = function(message, sendHandle) {
- if (!target._channel) throw new Error('channel closed');
+ if (typeof message === 'undefined') {
+ throw new TypeError('message cannot be undefined');
+ }
+
+ if (!target._channel) throw new Error("channel closed");
// For overflow protection don't write if channel queue is too deep.
if (channel.writeQueueSize > 1024 * 1024) {