Commit d02e1f2c authored by jarin@chromium.org's avatar jarin@chromium.org

Fix left trimming check for large objects

BUG=358090
TEST=test/mjsunit/regress/regress-358090.js
LOG=N
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/213833008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 702ba5a0
...@@ -558,7 +558,7 @@ BUILTIN(ArrayShift) { ...@@ -558,7 +558,7 @@ BUILTIN(ArrayShift) {
first = isolate->factory()->undefined_value(); first = isolate->factory()->undefined_value();
} }
if (!heap->CanMoveObjectStart(*elms_obj)) { if (heap->CanMoveObjectStart(*elms_obj)) {
array->set_elements(LeftTrimFixedArray(heap, *elms_obj, 1)); array->set_elements(LeftTrimFixedArray(heap, *elms_obj, 1));
} else { } else {
// Shift the elements. // Shift the elements.
......
// Copyright 2014 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.
var x = Array(100000);
y = Array.apply(Array, x);
y.unshift(4);
y.shift();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment