Hello,

Thank you for the responses. Indeed, the code was screaming loud when
the JS added property to prototype was NOT present in the new
instance: I was creating a brand new object from the constructor
itself, using the INITIAL template. So, the newly added properties
from JS were not present.

Assuming the point is created with var p=new Point(...);, Here is my
revised code.

http://pastebin.com/UWYi403p

Ernst, at line 41 if I'm doing
global->Set(String::New("Point"), functionTemplate->GetFunction());

as you suggested, I get a nice big crash. GetFunction() returns a
Function object, not template. Since I'm not in any context scope
(still building the global template), I don't think that makes any
sense. Am I right?

Anyway, thank you both for bringing me on the right path and showed me
the elephant in the room :). Now it works as expected

Finally, if is not too much to ask, please take a look at the revised
code and maybe you can throw me some more observations if any.

Cheers,
Andrei

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

Reply via email to