Please file a bug and assign it to [email protected]. Include the V8 version you are using.
http://code.google.com/p/v8/issues Thanks. 14. jun. 2011 06.21 skrev Nat <[email protected]>: > Is it expected that readonly property attribute can only be used with string > property but not indexed property? For example, in this case, readonly flag > is ignored for "0" and "1" key (The same happens with 0 and 1 key as well) > > v8::Locker l; > HandleScope hScope; > Persistent<Context> context = Context::New(); > { > Context::Scope cScope(context); > Local<Object> obj = Object::New(); > Local<String> zero = String::New("0"); > Local<String> one = String::New("1"); > Local<String> first = String::New("first"); > Local<String> second = String::New("second"); > obj->Set(first, zero, ReadOnly); > obj->Set(second, one, ReadOnly); > obj->Set(first, one); > obj->Set(second, zero); > obj->Set(zero, zero, ReadOnly); > obj->Set(one, one, ReadOnly); > obj->Set(zero, one); > obj->Set(one, zero); > > printf("%s %s\n", *String::Utf8Value(obj->Get(zero)->ToString()),*String::Utf8Value(obj->Get(first)->ToString())); > > printf("%s %s\n", *String::Utf8Value(obj->Get(one)->ToString()),*String::Utf8Value(obj->Get(second)->ToString())); > } > context.Dispose(); > context.Clear(); > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users -- Erik Corry, Software Engineer Google Denmark ApS - Frederiksborggade 20B, 1 sal, 1360 København K - Denmark - CVR nr. 28 86 69 84 -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
