OK, thank you all for the help with variable conversions. I think I
mostly have that part figured out.

However, I've now run into a frustrating problems with calling
JavaScript functions from c++. I made this gist to illustrate:

https://gist.github.com/771459

There's 4 snippets list there.

`A1_works` and `A2_broken` show one variation of the problem, and how
it works versus how it breaks.

Similarly, `B1_works` and `B2_broken` shows (I think the same??)
problem, and how it works versus how it breaks.

In `A2_broken`, I create a helper function that captures and stores
the JS function reference, and then returns that reference to be used
in another context.

In `B2_broken`, I do the reverse, and capture and store the JS
function reference in the global scope, and try to use that global
inside a function.

If I interpret what I'm seeing correctly, when I capture in my C++ a
reference to a JavaScript function, and store that in a variable, if I
do that process in a different context scope than where I use that
function reference to execute it (and get back its results), things go
haywire.

Can someone help me sort out what's going wrong here?

--Kyle

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

Reply via email to