On Thu, Apr 12, 2012 at 1:32 PM, Mike Schwartz <[email protected]> wrote:

> // this C++ function is callable from JS
>   v8::Persistent<v8::Function>::Cast(obj);
>

Out of curiosity: why do you use Persistent there? i've never used
Persistent for a local-scope handle before.

@OP: be very aware that Cast() will CRASH your app if obj is-not-a
Function, so check arg.IsObject() first.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal

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

Reply via email to