ff0cf00c72
This reverts commit 4e3a17d040
.
Reason for revert: Web compact issues, see crbug.com/910252
Original change's description:
> [runtime] Reduce spread/apply call max arguments
>
> Bug: chromium:906043
> Change-Id: I308b29af0644c318d73926b27e65a94913c760c7
> Reviewed-on: https://chromium-review.googlesource.com/c/1346115
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57731}
TBR=jarin@chromium.org,jgruber@chromium.org,petermarshall@chromium.org,bmeurer@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: chromium:906043
Change-Id: I240c1b55c10fd3e108e3c49f93ce1d9ca9c61780
Reviewed-on: https://chromium-review.googlesource.com/c/1356502
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57956}
24 lines
955 B
JavaScript
24 lines
955 B
JavaScript
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
"use strict";
|
|
|
|
function f(a, b, c) { return arguments }
|
|
function g(...args) { return args }
|
|
|
|
// On 64-bit machine this produces a 768K array which is sufficiently small to
|
|
// not cause a stack overflow, but big enough to move the allocated arguments
|
|
// object into large object space (kMaxRegularHeapObjectSize == 600K).
|
|
var length = Math.pow(2, 15) * 3;
|
|
var args = new Array(length);
|
|
assertEquals(length, f.apply(null, args).length);
|
|
assertEquals(length, g.apply(null, args).length);
|
|
|
|
// On 32-bit machines this produces an equally sized array, however it might in
|
|
// turn trigger a stack overflow on 64-bit machines, which we need to catch.
|
|
var length = Math.pow(2, 16) * 3;
|
|
var args = new Array(length);
|
|
try { f.apply(null, args) } catch(e) {}
|
|
try { g.apply(null, args) } catch(e) {}
|