Reviewers: ,

Message:
PTAL.

Description:
If we are trimming the whole array, just return the empty fixed array.


Please review this at https://chromiumcodereview.appspot.com/10911054/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/objects.cc


Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 5261b6a5ff931381d463e3fda522e23e24ad8389..6ffaa8e2137febd937aad2e2b0747dd5494d978c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12501,6 +12501,7 @@ void StringDictionary::CopyEnumKeysTo(FixedArray* storage) { // together by shifting them to the left (maintaining the enumeration order),
   // and trimming of the right side of the array.
   if (properties < length) {
+    if (properties == 0) return heap->empty_fixed_array();
     properties = 0;
     for (int i = 0; i < length; ++i) {
       Object* value = storage->get(i);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to