Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 551b8edd4905c6bf38652fddaa6370d2f7e96439..7969e7d4c561c8726112f1aa6fa909238e74020e 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4712,7 +4712,9 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name, |
// to do a lookup, which seems to be a bit of overkill. |
Heap* heap = GetHeap(); |
bool only_attribute_changes = getter->IsNull() && setter->IsNull(); |
- if (HasFastProperties() && !only_attribute_changes) { |
+ if (HasFastProperties() && !only_attribute_changes && |
+ (map()->NumberOfOwnDescriptors() < |
+ DescriptorArray::kMaxNumberOfDescriptors)) { |
MaybeObject* getterOk = heap->undefined_value(); |
if (!getter->IsNull()) { |
getterOk = DefineFastAccessor(name, ACCESSOR_GETTER, getter, attributes); |