Revision: 19579
Author:   [email protected]
Date:     Thu Feb 27 14:45:53 2014 UTC
Log:      Fix bogus assertion in SetFastDoubleElements.

[email protected]
BUG=347530
LOG=N

Review URL: https://codereview.chromium.org/181433016
http://code.google.com/p/v8/source/detail?r=19579

Added:
 /branches/bleeding_edge/test/mjsunit/regress/regress-347530.js
Modified:
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-347530.js Thu Feb 27 14:45:53 2014 UTC
@@ -0,0 +1,12 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc
+a = [];
+a[1000] = .1;
+a.length = 0;
+gc();
+gc();
+a[1000] = .1;
+assertEquals(.1, a[1000]);
=======================================
--- /branches/bleeding_edge/src/objects.cc      Thu Feb 27 13:25:05 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc      Thu Feb 27 14:45:53 2014 UTC
@@ -12471,7 +12471,8 @@
   // Otherwise default to slow case.
   ASSERT(object->HasFastDoubleElements());
   ASSERT(object->map()->has_fast_double_elements());
-  ASSERT(object->elements()->IsFixedDoubleArray());
+  ASSERT(object->elements()->IsFixedDoubleArray() ||
+         object->elements()->length() == 0);

   NormalizeElements(object);
   ASSERT(object->HasDictionaryElements());

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to