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

2014-01-26 Thread Jochen Eisinger
If you have a v8::Function you can pass the global state as first argument to Function::Call. best -jochen On Thu, Jan 23, 2014 at 10:07 PM, Kenton Varda tempo...@gmail.com wrote: Hi v8-users, I'm trying to figure out how, from the C++ API, I can create a function that effectively has some

[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