Argh, sorry, my fault. I was looking in the C++ code when the fault lay in the JavaScript. Shouldn't have directly transposed the Lua code...
On Thu, Dec 3, 2009 at 5:21 PM, Abdulla <[email protected]> wrote: > I'm passing an object which I initialise in JavaScript like so: > var o = { a: 9, b: 8, c: 7 }; > > I then pass this object in to C++ code, and use it to build another > object, except when I set the value of each field in the object, I set > it to null: > object->Set( key, v8::Null() ); > > When I then print this object in JavaScript, it has the same value as > it originally had: > { a: 9, b: 8, c: 7 } > > When I was expecting it to be: > { a: null, b: null, c: null } > > Is this correct behaviour? Is V8 doing some sort of optimisation since > I'm not setting a value? Or is the problem in my code? > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users -- Thank you Abdulla -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
