diff options
author | svenpanne@chromium.org <svenpanne@chromium.org> | 2012-11-09 11:30:05 +0000 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-01-10 23:32:08 +0000 |
commit | 196184d332ba2d2defc56ad0b37653659a7d3ec0 (patch) | |
tree | d0a311a49481d3215644d8a3c561b0f9ab46ae46 /deps | |
parent | 56913d2cde43ba970a305e919472bee6cdea0356 (diff) | |
download | node-new-196184d332ba2d2defc56ad0b37653659a7d3ec0.tar.gz |
v8: backport codereview.chromium.org/11362182
Keep the number of descriptors below
DescriptorArray::kMaxNumberOfDescriptors even for accessors
Review URL: https://codereview.chromium.org/11362182
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/src/objects.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 37f8361d8f..9935c222e4 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/src/objects.cc @@ -4453,7 +4453,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); |