Bug 1165052 - Part 8: Use ArraySpeciesCreate in Array.prototype.concat. r=efaust
authorTooru Fujisawa <arai_a@mac.com>
Wed, 23 Dec 2015 13:30:47 +0900
changeset 292161 b2ae0fa9376081d2b7c509f213458bb850ae27d8
parent 292160 450ea0e5c8cb17e38ac80c456b8674bfa4ade377
child 292162 fc13616aed735278e640805522ec4866f16305de
push id74764
push userarai_a@mac.com
push dateThu, 07 Apr 2016 10:49:15 +0000
treeherdermozilla-inbound@4d0f975a2311 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust
bugs1165052
milestone48.0a1
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
Bug 1165052 - Part 8: Use ArraySpeciesCreate in Array.prototype.concat. r=efaust
js/src/builtin/Array.js
--- a/js/src/builtin/Array.js
+++ b/js/src/builtin/Array.js
@@ -925,17 +925,17 @@ function ArraySpeciesCreate(originalArra
 
 // ES 2016 draft Mar 25, 2016 22.1.3.1.
 // Note: Array.prototype.concat.length is 1.
 function ArrayConcat(arg1) {
     // Step 1.
     var O = ToObject(this);
 
     // Step 2.
-    var A = std_Array(0);
+    var A = ArraySpeciesCreate(O, 0);
 
     // Step 3.
     var n = 0;
 
     // Step 4 (implicit in |arguments|).
 
     // Step 5.
     var i = 0, argsLen = arguments.length;