Backed out changeset 270383723cd0 (bug 1354974)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 28 Apr 2017 16:24:10 +0200
changeset 355558 dc19ec159be24735c18f3afdee00c6b9c881b39f
parent 355557 2baf4e5a516aa6a8eb7ca7080dc7d8c8f41e5c25
child 355559 12a29d618d6eb7ed27c0e8f3b1ce551fa8ef0880
push id89693
push userarchaeopteryx@coole-files.de
push dateFri, 28 Apr 2017 14:27:11 +0000
treeherdermozilla-inbound@edaf81997a7b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1354974
milestone55.0a1
backs out270383723cd0fdd9cd9393eb854ca1f796c13507
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 270383723cd0 (bug 1354974)
js/src/jsarray.cpp
js/src/tests/ecma_7/Array/slice-sparse-with-large-index.js
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -2819,20 +2819,20 @@ GetIndexedPropertiesInRange(JSContext* c
         }
 
         // Append sparse elements.
         if (pobj->isIndexed()) {
             Shape::Range<NoGC> r(pobj->as<NativeObject>().lastProperty());
             for (; !r.empty(); r.popFront()) {
                 Shape& shape = r.front();
                 jsid id = shape.propid();
-                uint32_t i;
-                if (!IdIsIndex(id, &i))
+                if (!JSID_IS_INT(id))
                     continue;
 
+                uint32_t i = uint32_t(JSID_TO_INT(id));
                 if (!(begin <= i && i < end))
                     continue;
 
                 // Watch out for getters, they can add new properties.
                 if (!shape.hasDefaultGetter())
                     return true;
 
                 if (!indexes.append(i))
deleted file mode 100644
--- a/js/src/tests/ecma_7/Array/slice-sparse-with-large-index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var array = [];
-array[2**31 - 2] = "INT32_MAX - 1";
-array[2**31 - 1] = "INT32_MAX";
-array[2**31 - 0] = "INT32_MAX + 1";
-array[2**32 - 2] = "UINT32_MAX - 1";
-array[2**32 - 1] = "UINT32_MAX";
-array[2**32 - 0] = "UINT32_MAX + 1";
-
-var copy = array.slice();
-assertEq(copy[2**31 - 2], "INT32_MAX - 1");
-assertEq(copy[2**31 - 1], "INT32_MAX");
-assertEq(copy[2**31 - 0], "INT32_MAX + 1");
-assertEq(copy[2**32 - 2], "UINT32_MAX - 1");
-assertEq(copy[2**32 - 1], undefined);
-assertEq(copy[2**32 - 0], undefined);
-
-if (typeof reportCompare === "function")
-    reportCompare(true, true);