Backport: Fix Object.entries/values with changing elements

Bug: 111274046
Test: m -j proxy_resolver_v8_unittest && adb sync && adb shell \
/data/nativetest64/proxy_resolver_v8_unittest/proxy_resolver_v8_unittest
Change-Id: I705fc512cc5837e9364ed187559cc75d079aa5cb
(cherry picked from commit d8be9a10287afed07705ac8af027d6a46d4def99)

 static void DeleteAtEnd(Handle<JSObject> obj,
 Handle<BackingStore> backing_store, uint32_t entry) {
 uint32_t length = static_cast<uint32_t>(backing_store->length());
 Isolate* isolate = obj->GetIsolate();
 for (; entry > 0; entry--) {
 if (!backing_store->is_the_hole(isolate, entry - 1)) break;
 }
 if (entry == 0) {
 FixedArray* empty = isolate->heap()->empty_fixed_array();
 if (obj->GetElementsKind() == FAST_SLOPPY_ARGUMENTS_ELEMENTS) {
 FixedArray::cast(obj->elements())->set(1, empty);
 } else {
        obj->set_elements(empty);
 }
 return;
 }

    isolate->heap()->RightTrimFixedArray(*backing_store, length - entry);
 }

 static void DeleteAtEnd(Handle<JSObject> obj,
 Handle<BackingStore> backing_store, uint32_t entry) {
 uint32_t length = static_cast<uint32_t>(backing_store->length());
 Isolate* isolate = obj->GetIsolate();
 for (; entry > 0; entry--) {
 if (!backing_store->is_the_hole(isolate, entry - 1)) break;
 }
 if (entry == 0) {
 FixedArray* empty = isolate->heap()->empty_fixed_array();
 if (obj->GetElementsKind() == FAST_SLOPPY_ARGUMENTS_ELEMENTS) {
 FixedArray::cast(obj->elements())->set(1, empty);
 } else {
        obj->set_elements(empty);
 }
 return;
 }

    isolate->heap()->RightTrimFixedArray(*backing_store, length - entry);
 }
