| Index: src/runtime/runtime-array.cc
|
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
|
| index 28e92cbd2baa0b8e977609dec2ec14733c6090a2..f2a217d7f7c0c1d0b87a8981245d209056add3df 100644
|
| --- a/src/runtime/runtime-array.cc
|
| +++ b/src/runtime/runtime-array.cc
|
| @@ -120,9 +120,11 @@ RUNTIME_FUNCTION(Runtime_PushIfAbsent) {
|
| RUNTIME_FUNCTION(Runtime_RemoveArrayHoles) {
|
| HandleScope scope(isolate);
|
| DCHECK(args.length() == 2);
|
| - CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
|
| + CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
|
| CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
|
| - return *JSObject::PrepareElementsForSort(object, limit);
|
| + if (object->IsJSProxy()) return Smi::FromInt(-1);
|
| + return *JSObject::PrepareElementsForSort(Handle<JSObject>::cast(object),
|
| + limit);
|
| }
|
|
|
|
|
|
|