Bug 711288 - Unconditionally use the new value of JSPROP_READONLY in accessor -> data transformations. r=Waldo

This commit is contained in:
Bobby Holley 2011-12-16 14:32:39 -08:00
parent 54c1bfce65
commit 6fbf6cf8f6

View File

@ -2331,7 +2331,8 @@ DefinePropertyOnObject(JSContext *cx, JSObject *obj, const jsid &id, const PropD
unchanged |= JSPROP_PERMANENT;
if (!desc.hasEnumerable)
unchanged |= JSPROP_ENUMERATE;
if (!desc.hasWritable)
/* Watch out for accessor -> data transformations here. */
if (!desc.hasWritable && shape->isDataDescriptor())
unchanged |= JSPROP_READONLY;
if (desc.hasValue)