Skip to content

Commit

Permalink
src: fix WITH_GENERIC_STREAM() type check bug
Browse files Browse the repository at this point in the history
The handle object was checked against the wrong constructor template.
Put another way, it was unwrapped as the wrong StreamWrap type.
  • Loading branch information
bnoordhuis committed Aug 6, 2013
1 parent 5764966 commit 45d056e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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)) { \
TTYWrap* wrap = TTYWrap::Unwrap(obj); \
BODY \
} else if (!pipeConstructorTmpl.IsEmpty() && \
HasInstance(pipeConstructorTmpl, obj)) { \
TCPWrap* wrap = TCPWrap::Unwrap(obj); \
PipeWrap* wrap = PipeWrap::Unwrap(obj); \
BODY \
} \
} while (0)
Expand Down

0 comments on commit 45d056e

Please sign in to comment.