Sorry for not answering the question directly, but I'd highly recommend that you use nan (https://github.com/rvagg/nan) when writing your native addons. It ensures node compatibility for older versions as well as future ones, and has a slightly more pleasant to use API than V8's.
On Tue, May 27, 2014 at 4:40 PM, Gautham Badhrinathan <[email protected]>wrote: > I have an Object that extends node::ObjectWrap as follows: > > class DNSServiceRefWrap : public node::ObjectWrap {public: > DNSServiceRefWrap(); > static void New(const v8::FunctionCallbackInfo<v8::Value> &args);private: > ~DNSServiceRefWrap(); > DNSServiceRef *ref;} > > In a method that I'm exporting through module.exports, I have: > > void RegisterService(const FunctionCallbackInfo<Value> &args) { > Isolate* isolate = Isolate::GetCurrent(); > HandleScope scope(isolate); > > DNSServiceRefWrap::New(args); > // Over here} > > How do I unwrap and access the newly created DNSServiceRefWrap object > here? > > *Note:* I'm using node v0.11.13. > > Cross posted on > StackOverflow<http://stackoverflow.com/questions/23899759/unwrap-a-newly-created-objectwrap-from-functioncallbackinfo> > . > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/9e1441f8-7b87-4974-8ac8-57fe4c1e6c8b%40googlegroups.com<https://groups.google.com/d/msgid/nodejs/9e1441f8-7b87-4974-8ac8-57fe4c1e6c8b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAN5MXocTL0Paz%3DZQ9-3z7U%3DCS3Oovad3PYPPTCCG7XQR_9VuiA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
