Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 9c1a9cd69f5ee0ceba6416fdba0a2309660f541b..636113d439e3f21288435e1dae6df74b27bab3b1 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7905,6 +7905,14 @@ MaybeObject* PolymorphicCodeCacheHashTable::Put(MapHandleList* maps, |
} |
+void FixedArray::Shrink(int new_length) { |
+ ASSERT(0 <= new_length && 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 = |