Browse Source

src: fix WITH_GENERIC_STREAM() type check bug

The handle object was checked against the wrong constructor template.
Put another way, it was unwrapped as the wrong StreamWrap type.
v0.11.5-release
Ben Noordhuis 12 years ago
parent
commit
45d056ee69
  1. 4
      src/node_wrap.h

4
src/node_wrap.h

@ -40,7 +40,7 @@ extern v8::Persistent<v8::FunctionTemplate> tcpConstructorTmpl;
do { \
if (!tcpConstructorTmpl.IsEmpty() && \
HasInstance(tcpConstructorTmpl, obj)) { \
PipeWrap* wrap = PipeWrap::Unwrap(obj); \
TCPWrap* wrap = TCPWrap::Unwrap(obj); \
BODY \
} else if (!ttyConstructorTmpl.IsEmpty() && \
HasInstance(ttyConstructorTmpl, obj)) { \
@ -48,7 +48,7 @@ extern v8::Persistent<v8::FunctionTemplate> tcpConstructorTmpl;
BODY \
} else if (!pipeConstructorTmpl.IsEmpty() && \
HasInstance(pipeConstructorTmpl, obj)) { \
TCPWrap* wrap = TCPWrap::Unwrap(obj); \
PipeWrap* wrap = PipeWrap::Unwrap(obj); \
BODY \
} \
} while (0)

Loading…
Cancel
Save