summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2013-11-19 11:38:48 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2013-11-19 12:44:06 +0400
commit5ce50ece16e52dad94834f977313f36f83732273 (patch)
tree352797d03990c2da383bf30d7748b488b56ed1cb /src
parent1394d5856b4c7b7ade1f1accbd9bffeea2e2144d (diff)
downloadnodejs-5ce50ece16e52dad94834f977313f36f83732273.tar.gz
nodejs-5ce50ece16e52dad94834f977313f36f83732273.tar.bz2
nodejs-5ce50ece16e52dad94834f977313f36f83732273.zip
dgram: fix abort when getting `fd` of closed dgram
v8's `messages.js` file's `CallSiteGetMethodName` is running through all object properties and getter to figure out method name of function that appears in stack trace. This run-through will also read `fd` property of `UDPWrap` instance's javascript object, making `UNWRAP()` fail. As a simple alternative to the test case above, one could just keep reference to the dgram handle and try accessing `handle.fd` after it has been fully closed. fix #6536
Diffstat (limited to 'src')
-rw-r--r--src/udp_wrap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
index 73b722f67..b33f4e881 100644
--- a/src/udp_wrap.cc
+++ b/src/udp_wrap.cc
@@ -144,7 +144,7 @@ Handle<Value> UDPWrap::GetFD(Local<String>, const AccessorInfo& args) {
return v8::Null();
#else
HandleScope scope;
- UNWRAP(UDPWrap)
+ UNWRAP_NO_ABORT(UDPWrap)
int fd = (wrap == NULL) ? -1 : wrap->handle_.io_watcher.fd;
return scope.Close(Integer::New(fd));
#endif