| Index: src/v8natives.js
|
| ===================================================================
|
| --- src/v8natives.js (revision 4711)
|
| +++ src/v8natives.js (working copy)
|
| @@ -604,7 +604,13 @@
|
| flag |= DONT_DELETE;
|
|
|
| if (IsDataDescriptor(desc) || IsGenericDescriptor(desc)) {
|
| - flag |= desc.isWritable() ? 0 : READ_ONLY;
|
| + if (desc.hasWritable()) {
|
| + flag |= desc.isWritable() ? 0 : READ_ONLY;
|
| + } else if (!IS_UNDEFINED(current)) {
|
| + flag |= current.isWritable() ? 0 : READ_ONLY;
|
| + } else {
|
| + flag |= READ_ONLY;
|
| + }
|
| %DefineOrRedefineDataProperty(obj, p, desc.getValue(), flag);
|
| } else {
|
| if (desc.hasGetter() && IS_FUNCTION(desc.getGet())) {
|
|
|