[v8-users] C++ API: Making a function with captured state

2014-01-23 Thread Kenton Varda
Hi v8-users, I'm trying to figure out how, from the C++ API, I can create a function that effectively has some dynamically-captured state, as a closure might have in pure Javascript. I need to generate many different instances of the same function but with different captured values. In

Re: [v8-users] Multithreading and extension registration

2014-01-23 Thread Niklas Voss
Thanks, I was able to resolve all issues. Unfortunately I ran into the next issue. I am trying to implement communication between isolates: First I get a persistent handle of the message and then forward it to the target isolate triggering a call- back with the a new local handle to the

Re: [v8-users] Multithreading and extension registration

2014-01-23 Thread Niklas Voss
Messed isolates/isotopes up again... I mean isolates of course... On Thursday, 23 January 2014 22:55:24 UTC, Niklas Voss wrote: Thanks, I was able to resolve all issues. Unfortunately I ran into the next issue. I am trying to implement communication between isolates: First I get a

[v8-users] Re: (Nodejs/v8) Storing a v8::Array in a c++ class

2014-01-23 Thread Flying Jester
Can we see the code? -- -- 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

Re: [v8-users] Re: (Nodejs/v8) Storing a v8::Array in a c++ class

2014-01-23 Thread Kevin Ingwersen
In the meantime, I found my solution. It’s in the ph7 nodejs module. http://github.com/Deskshell-Core/node-ph7 Look at ph7_wrapper.(cpp/h) - it has the code in question. While asking the question, I was stuck with the c++ constructor. Turns out I had to use PersistantArray::New(

Re: [v8-users] Multithreading and extension registration

2014-01-23 Thread Sven Panne
On Thu, Jan 23, 2014 at 11:55 PM, Niklas Voss niklas.v...@gmail.com wrote: [...] Are persistent values bound to isotopes? And if, how can I pass an arbitrary value handle to another isotope/thread? Everything created in one Isolate is tied to that Isolate and using it somehow in another