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
This commit is contained in:
parent
8535c6484d
commit
97c54506c5
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user