Yes. You just:

v8::Handle<v8::Function> myv8Function = v8::Function::New(...);
v8::Persistent<v8::Function> funcRef =  
v8::Persistent<v8::Function>::New(myv8Function);

In other words, you pass the result of Function::New into  
Persistent<Function>::New, creating a persistent handle to the function.

Alex

On May 1, 2009, at 10:19 AM, [email protected] wrote:

>
> Is there a way to create persistent function handles?
>
> v8::Persistent<v8::Function> funcRef;
>
> The documentation says that persistent handles must be created with
> Persistent::New, but I don't see anything like  v8::Function::New(),
> let alone how to specify the function handle once it's been created
> with New...
>
> -----------
> Tomas K
> >

Alex Iskander, TPSi






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

Reply via email to