You haven't shown us the source for the function posix_time. What does  
it return?

On Sep 28, 2008, at 3:57 PM, Sébastien wrote:

>
> Hi,
>
> I have a problem when using Object->Set in this specific code:
>
>  module->Set(String:new("time"),v8::FunctionTemplate::New(posix_time)-
>> GetFunction());
>
> When I later execute javascript code that accesses the "time" property
> of the module object, I get "undefined" as a value. However, if I do:
>
>  module->Set(String:new("time"),String:new("foo"));
>
> Then "foo" will be returned as the "time" property of the module
> object. Even more strangely, if I do:
>
>  module->Set(String:new("time"),String:new("foo"));
>  module->Set(String:new("time"),v8::FunctionTemplate::New(posix_time)-
>> GetFunction());
>
> The the "time" property will still be "foo" (while it should be
> undefined) -- so it looks like the second "module->Set" does not
> produce any effect.
>
> Any ideas ?
>
> -- Sébastien
> >


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

Reply via email to