diff options
author | isaacs <i@izs.me> | 2013-03-13 22:22:33 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-03-13 22:26:36 +0400 |
commit | 110cacd1ed7350cd718b0d5aa0ce8c320c040bb1 (patch) | |
tree | b7c684c1ed265ca4325ad977d55b202e775f6502 /src/handle_wrap.h | |
parent | 9af0085f700294b3535fe9d324e3cdf71b071d03 (diff) |
core: Move UNWRAP_NO_ABORT to handle_wrap.h
Otherwise it cannot be used in StreamWrap.
Forgot to include in last patch, broke the build.
Diffstat (limited to 'src/handle_wrap.h')
-rw-r--r-- | src/handle_wrap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/handle_wrap.h b/src/handle_wrap.h index 6780cd72fe0..dbefc2a1140 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -46,6 +46,12 @@ namespace node { // js/c++ boundary crossing. At the javascript layer that should all be // taken care of. +#define UNWRAP_NO_ABORT(type) \ + assert(!args.Holder().IsEmpty()); \ + assert(args.Holder()->InternalFieldCount() > 0); \ + type* wrap = static_cast<type*>( \ + args.Holder()->GetPointerFromInternalField(0)); + class HandleWrap { public: static void Initialize(v8::Handle<v8::Object> target); |