Commit 97c54506 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Fix shifting from holey arrays.

Review URL: https://chromiumcodereview.appspot.com/11417007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12975 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8535c648
......@@ -714,6 +714,9 @@ BUILTIN(ArrayShift) {
Object* first;
MaybeObject* maybe_first = accessor->Get(receiver, array, 0, elms_obj);
if (!maybe_first->To(&first)) return maybe_first;
if (first->IsTheHole()) {
first = heap->undefined_value();
}
if (!heap->lo_space()->Contains(elms_obj)) {
array->set_elements(LeftTrimFixedArray(heap, elms_obj, 1));
......
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