Blame SOURCES/v8-3.14.5.10-enumeration.patch

e93883
From 196184d332ba2d2defc56ad0b37653659a7d3ec0 Mon Sep 17 00:00:00 2001
e93883
From: "svenpanne@chromium.org" <svenpanne@chromium.org>
e93883
Date: Fri, 9 Nov 2012 11:30:05 +0000
e93883
Subject: [PATCH] v8: backport codereview.chromium.org/11362182
e93883
e93883
Keep the number of descriptors below
e93883
DescriptorArray::kMaxNumberOfDescriptors even for accessors
e93883
e93883
Review URL: https://codereview.chromium.org/11362182
e93883
---
e93883
 src/objects.cc | 4 +++-
e93883
 1 file changed, 3 insertions(+), 1 deletion(-)
e93883
e93883
diff --git a/src/objects.cc b/src/objects.cc
e93883
--- a/src/objects.cc
e93883
+++ b/src/objects.cc
e93883
@@ -4453,7 +4453,9 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
e93883
   // to do a lookup, which seems to be a bit of overkill.
e93883
   Heap* heap = GetHeap();
e93883
   bool only_attribute_changes = getter->IsNull() && setter->IsNull();
e93883
-  if (HasFastProperties() && !only_attribute_changes) {
e93883
+  if (HasFastProperties() && !only_attribute_changes &&
e93883
+      (map()->NumberOfOwnDescriptors() <
e93883
+       DescriptorArray::kMaxNumberOfDescriptors)) {
e93883
     MaybeObject* getterOk = heap->undefined_value();
e93883
     if (!getter->IsNull()) {
e93883
       getterOk = DefineFastAccessor(name, ACCESSOR_GETTER, getter, attributes);
e93883
--
e93883
1.8.5.1
e93883