Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index de8ee90b6e71d6302aaf5950bd0f94922c1c2bf2..6ff4d22142d7e318c91feb3460ad93df8d92b59a 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7839,6 +7839,14 @@ MaybeObject* PolymorphicCodeCacheHashTable::Put(MapHandleList* maps, |
} |
+void FixedArray::Shrink(int new_length) { |
+ ASSERT(new_length <= length()); |
+ if (new_length < length()) { |
+ RightTrimFixedArray<FROM_MUTATOR>(GetHeap(), this, length() - new_length); |
+ } |
+} |
+ |
+ |
MaybeObject* FixedArray::AddKeysFromJSArray(JSArray* array) { |
ElementsAccessor* accessor = array->GetElementsAccessor(); |
MaybeObject* maybe_result = |