// A non-configurable property will cause the truncation operation to
// stop at this index.
if (attributes == DONT_DELETE) break;
- // TODO(adamk): Don't fetch the old value if it's an accessor.
- old_values.Add(Object::GetElement(self, i));
+ old_values.Add(
+ self->GetLocalElementAccessorPair(i) == NULL
+ ? Object::GetElement(self, i)
+ : Handle<Object>::cast(isolate->factory()->the_hole_value()));
indices.Add(isolate->factory()->Uint32ToString(i));
}
Object.deliverChangeRecords(observer.callback);
observer.assertCallbackRecords([
{ object: arr, name: '3', type: 'deleted', oldValue: 'd' },
- // TODO(adamk): oldValue should not be present below
- { object: arr, name: '2', type: 'deleted', oldValue: undefined },
+ { object: arr, name: '2', type: 'deleted' },
{ object: arr, name: 'length', type: 'updated', oldValue: 4 },
{ object: arr, name: '1', type: 'deleted', oldValue: 'b' },
{ object: arr, name: 'length', type: 'updated', oldValue: 2 },