[v8-users] Re: Using Context::Scope with new Persistent

2013-09-03 Thread Dan Carney


 1st question is why?  It's seems like needless complexity.


It's fundamentally unsafe to pass a persistent to a v8 api call.  This is 
why Persistent no longer extends Handle.
 

 2nd question is what is the correct way to do this?


LocalWhateverType::New(isolate, persistent);

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[v8-users] Re: Using Context::Scope with new Persistent

2013-09-03 Thread Bit Cortex
Hi Dan,

In the latest stable source, that Local::New method is marked // 
TODO(dcarney): remove before cutover. Does that mean the new API is still 
not finalized and the method is likely to go away?

Thanks!

On Tuesday, September 3, 2013 2:56:12 AM UTC-4, Dan Carney wrote:


 1st question is why?  It's seems like needless complexity.


 It's fundamentally unsafe to pass a persistent to a v8 api call.  This is 
 why Persistent no longer extends Handle.
  

 2nd question is what is the correct way to do this?


 LocalWhateverType::New(isolate, persistent);



-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[v8-users] Re: Using Context::Scope with new Persistent

2013-09-02 Thread Mike Moening
 You need a LocalContext not a Persistent.

1st question is why?  It's seems like needless complexity.

2nd question is what is the correct way to do this?
I've got many situations where I can no longer pass in a Persistent and 
must make a Local of various types like:

PersistentScript
PersistentObject
PersistentContext
etc...

Seems like there are possibly several ways to do it:
As()
Cast()
other?

Thanks

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.