On Friday, April 18, 2014 10:13:56 PM UTC-4, Jonathan Cardoso wrote:
>
> I've forked a library for a native module that had not received any 
> updates for a while, as I'm learning some C++, I will try to learn working 
> on this module.
>
> And taking a look at the code, I just hit a question, there is no 
> v8::HandleScope on the exposed methods, this can cause something 
> unexpected?
>
>
It's best to have a HandleScope (at the top) in any function where v8 
handles/values/etc. are being created and/or used. Also lines like [1] 
should use scope.Close() around the value instead of returning it directly. 
It should be noted that the v8 API has changed a fair amount 
post-node-v0.10.x.

[1] 
https://github.com/JCMais/node-libcurl/blob/develop/src/node-curl.cc#L322

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to