Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 6617fe1ad9738b80c72912c9984504a4d01ff3ce..88918cff08bbf64043f139ea192c98e86866eefb 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -711,6 +711,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)); |