On Fri, Nov 12, 2010 at 8:38 AM, Matthias Ernst <[email protected]> wrote:

> I don't think there is a length restriction. Rather, your method may
> fail because the char* is deleted as soon as the AsciiValue goes out
> of scope - it owns the array. I guess v8.h could make that more clear.
> If you expand the expression inline it should work:
>

i agree. The lifetime of the char bytes are undefined in your example, and
v8 "almost certainly" deletes them the first chance it gets.
See:
http://code.google.com/p/v8-juice/wiki/BindingFunctions#The_(_char_const_*_)_Problem

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

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

Reply via email to