Reviewers: danno,
Description:
Fix bogus assertion in SetFastDoubleElements.
[email protected]
BUG=347530
LOG=N
Please review this at https://codereview.chromium.org/181433016/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+10, -8 lines):
M src/objects.cc
A + test/mjsunit/regress/regress-347530.js
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
d2ad0b7f5e866db7b3abc6b6e7b8d601db2989cd..9478549cde74dfe585b0ed349d214f9d24f45527
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12465,7 +12465,8 @@ Handle<Object> JSObject::SetFastDoubleElement(
// 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());
Index: test/mjsunit/regress/regress-347530.js
diff --git a/test/mjsunit/regress/regress-crbug-346141.js
b/test/mjsunit/regress/regress-347530.js
similarity index 60%
copy from test/mjsunit/regress/regress-crbug-346141.js
copy to test/mjsunit/regress/regress-347530.js
index
798b7704ec2cc0eb928966fdfe9f979d0fe51f94..330fda38c01b5b3c8cc3926fda0520b086aa7289
100644
--- a/test/mjsunit/regress/regress-crbug-346141.js
+++ b/test/mjsunit/regress/regress-347530.js
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-symbols
-
-var s = Symbol()
-var o = {}
-o[s] = 2
-o[""] = 3
-Object.getOwnPropertySymbols(o)
+// Flags: --expose-gc
+a = [];
+a[1000] = .1;
+a.length = 0;
+gc();
+gc();
+a[1000] = .1;
+assertEquals(.1, a[1000]);
--
--
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.