Backed out changeset 35b1a010cb9f (bug 1041586)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Sun, 17 Apr 2016 05:45:42 +0200
changeset 331410 533daf1ab8c9ea5009f45569639b9e4e86b27e4e
parent 331409 1a309a682f19420bfbd04d219dbb3e1d95bfdda0
child 331411 fe492b1cbc396bd09f3b414c3d014f83ad2c1b9a
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1041586
milestone48.0a1
backs out35b1a010cb9fe88ee4975e7c7e6291096bd4a748
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 35b1a010cb9f (bug 1041586)
js/src/tests/ecma_6/Array/concat-spreadable-basic.js
js/src/tests/ecma_6/Array/concat-spreadable-primitive.js
js/src/tests/ecma_6/Array/species.js
deleted file mode 100644
--- a/js/src/tests/ecma_6/Array/concat-spreadable-basic.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/licenses/publicdomain/ */
-"use strict";
-
-const x = Object.freeze([1, 2, 3]);
-
-let fakeArray = {
-    [Symbol.isConcatSpreadable]: true,
-    length: 2,
-    0: "hello",
-    1: "world"
-}
-assertDeepEq(x.concat(fakeArray), [1, 2, 3, "hello", "world"]);
-assertDeepEq(x.concat(fakeArray, fakeArray), [1, 2, 3, "hello", "world", "hello", "world"]);
-
-for (let truthy of [true, 3.41, "abc", Symbol(), {}]) {
-    let obj = {[Symbol.isConcatSpreadable]: truthy, length: 1, 0: "hey"}
-    assertDeepEq(x.concat(obj), [1, 2, 3, "hey"]);
-}
-
-for (let notTruthy of [null, undefined, false, 0, NaN, ""]) {
-    let obj = {[Symbol.isConcatSpreadable]: notTruthy, length: 1, 0: "hey"}
-    assertDeepEq(x.concat(obj), [1, 2, 3, obj]);
-}
-
-let array = [5, 4];
-assertDeepEq(x.concat(array), [1, 2, 3, 5, 4]);
-
-// Can make arrays non-spreadable
-array[Symbol.isConcatSpreadable] = false;
-assertDeepEq(x.concat(array), [1, 2, 3, [5, 4]]);
-
-// Explicitly spreadable
-array[Symbol.isConcatSpreadable] = true;
-assertDeepEq(x.concat(array), [1, 2, 3, 5, 4]);
-
-reportCompare(true, true);
deleted file mode 100644
--- a/js/src/tests/ecma_6/Array/concat-spreadable-primitive.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/licenses/publicdomain/ */
-"use strict";
-
-// Primitive values should never be tried to spread
-let primitives = [
-    10,
-    false,
-    Symbol()
-    // Can't change String.prototype.length
-];
-
-for (let value of primitives) {
-    let prototype = Object.getPrototypeOf(value);
-    prototype[Symbol.isConcatSpreadable] = true;
-
-    Object.defineProperty(prototype, "length", {
-        configurable: true,
-        get() {
-            // Should never invoke length getter
-            assertEq(true, false);
-        },
-    });
-
-    let x = [1, 2].concat(value);
-    assertDeepEq(x, [1, 2, value]);
-
-    delete prototype[Symbol.isConcatSpreadable];
-    delete prototype.length;
-
-    prototype.length;
-}
-
-reportCompare(true, true);
--- a/js/src/tests/ecma_6/Array/species.js
+++ b/js/src/tests/ecma_6/Array/species.js
@@ -167,16 +167,16 @@ class ${funcName}Class2 extends Array {
   }
 }
 a = new ${funcName}Class2(1, 2, 3, 4, 5);
 b = a[funcName](...args);
 assertEq(b.constructor, Date);
 `);
 }
 
-test("concat", [], 0, "get:concat,get:constructor,c-get:Symbol(Symbol.species),get:Symbol(Symbol.isConcatSpreadable),get:length,get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
+test("concat", [], 0, "get:concat,get:constructor,c-get:Symbol(Symbol.species),get:length,get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
 test("filter", [x => x % 2], 0, "get:filter,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,get:2,define:1:3:true:true:true,get:3,get:4,define:2:5:true:true:true,");
 test("map", [x => x * 2], 5, "get:map,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:2:true:true:true,get:1,define:1:4:true:true:true,get:2,define:2:6:true:true:true,get:3,define:3:8:true:true:true,get:4,define:4:10:true:true:true,");
 test("slice", [], 5, "get:slice,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
 test("splice", [0, 5], 5, "get:splice,get:length,get:constructor,c-get:Symbol(Symbol.species),get:0,define:0:1:true:true:true,get:1,define:1:2:true:true:true,get:2,define:2:3:true:true:true,get:3,define:3:4:true:true:true,get:4,define:4:5:true:true:true,set:length:5,");
 
 if (typeof reportCompare === "function")
   reportCompare(true, true);