On Sun, Oct 6, 2013 at 1:40 PM, James Lomax <[email protected]> wrote:
> Thanks, is there a special way to turn a Local<Value> into a
> Persistent<Function>?
>
> I tried changing FuncWrapper to wrap a Persistent<Function> and then solved
> the problem of turning a Local into a persistent with this (in
> setWorldUpdate):
>
> fw->func =
> Persistent<Function>::Cast(Persistent<Value>(static_cast<Handle<Value>>(value)));
>
> But the problem persists (with no difference noted.)

Don't use Cast() here.  Depending on the V8 version, you'd either use:

    fw->func = Persistent<Function>::New(...);

Or:

    fw->func.Reset(isolate, ...)

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" 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/groups/opt_out.

Reply via email to