diff --git a/js/src/builtin/Array.js b/js/src/builtin/Array.js index 1fa27e01e207..064becf7b743 100644 --- a/js/src/builtin/Array.js +++ b/js/src/builtin/Array.js @@ -942,23 +942,6 @@ function ArraySpeciesCreate(originalArray, length) { return new C(length); } -// ES 2017 draft (April 8, 2016) 22.1.3.1.1 -function IsConcatSpreadable(O) { - // Step 1. - if (!IsObject(O)) - return false; - - // Step 2. - var spreadable = O[std_isConcatSpreadable]; - - // Step 3. - if (spreadable !== undefined) - return ToBoolean(spreadable); - - // Step 4. - return IsArray(O); -} - // ES 2016 draft Mar 25, 2016 22.1.3.1. // Note: Array.prototype.concat.length is 1. function ArrayConcat(arg1) { @@ -982,7 +965,8 @@ function ArrayConcat(arg1) { var k, len; while (true) { // Steps 5.b-c. - if (IsConcatSpreadable(E)) { + // IsArray should be replaced with IsConcatSpreadable (bug 1041586). + if (IsArray(E)) { // Step 5.c.ii. len = ToLength(E.length); diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index 6a461e3cf941..651f0a29734b 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -445,14 +445,6 @@ GlobalObject::initSelfHostingBuiltins(JSContext* cx, Handle globa return false; } - RootedValue std_isConcatSpreadable(cx); - std_isConcatSpreadable.setSymbol(cx->wellKnownSymbols().get(JS::SymbolCode::isConcatSpreadable)); - if (!JS_DefineProperty(cx, global, "std_isConcatSpreadable", std_isConcatSpreadable, - JSPROP_PERMANENT | JSPROP_READONLY)) - { - return false; - } - // Define a top-level property 'std_iterator' with the name of the method // used by for-of loops to create an iterator. RootedValue std_iterator(cx);