Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 2b6f2352ae647b5a2eec0b7461caa3aeab50b8a2..fac8b5bd876c662e02680aa53e81bd9a721581c9 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4257,10 +4257,9 @@ void JSObject::LookupCallback(String* name, LookupResult* result) { |
// Search for a getter or setter in an elements dictionary and update its |
-// attributes. Returns either undefined if the element is read-only, or the |
-// getter/setter pair (fixed array) if there is an existing one, or the hole |
-// value if the element does not exist or is a normal non-getter/setter data |
-// element. |
+// attributes. Returns either the getter/setter pair (fixed array) if there |
+// is an existing one, or the hole value if the element does not exist or is |
+// a normal non-getter/setter data element. |
static Object* UpdateGetterSetterInDictionary(NumberDictionary* dictionary, |
uint32_t index, |
PropertyAttributes attributes, |
@@ -4269,7 +4268,6 @@ static Object* UpdateGetterSetterInDictionary(NumberDictionary* dictionary, |
if (entry != NumberDictionary::kNotFound) { |
Object* result = dictionary->ValueAt(entry); |
PropertyDetails details = dictionary->DetailsAt(entry); |
- if (details.IsReadOnly()) return heap->undefined_value(); |
rossberg
2011/12/16 12:03:36
IsReadOnly clearly is the wrong check here. But I
Michael Starzinger
2011/12/16 12:38:02
Done. As discussed offline: The correct check here
|
if (details.type() == CALLBACKS && result->IsFixedArray()) { |
if (details.attributes() != attributes) { |
dictionary->DetailsAtPut(entry, |
@@ -4353,7 +4351,6 @@ MaybeObject* JSObject::DefineGetterSetter(String* name, |
LookupResult result(heap->isolate()); |
LocalLookup(name, &result); |
if (result.IsProperty()) { |
- if (result.IsReadOnly()) return heap->undefined_value(); |
if (result.type() == CALLBACKS) { |
Object* obj = result.GetCallbackObject(); |
// Need to preserve old getters/setters. |