On Fri, Apr 9, 2010 at 8:17 AM, Matthias Ernst <[email protected]> wrote:

>   X* myC++Object =
>       static_cast<X*>(External::Unwrap(args->This()->GetInternalField(0)));
>

i slight addendum to that:

be VERY careful when using GetInternalField() and Externals. Both will crash
your app if they are mis-used. Always check for valid ranges, and always
make sure the handle is-a External before trying to dereference it. v8 is
exceedingly unforgiving of mis-use of the library (and how to use it
correctly often requires a lot of guesswork, as the docs are quite lean).


-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to