Revert "Issue #1382 - Remove invalid assertion."

This reverts commit 9c6a8450b3e96442035b84025b0dd13be3a9e5f8.
This commit is contained in:
wolfbeast 2020-02-23 11:33:50 +01:00 committed by Roy Tam
commit eab2558676

View file

@ -2106,15 +2106,14 @@ js::ArrayShiftMoveElements(NativeObject* obj)
MOZ_ASSERT_IF(obj->is<ArrayObject>(), obj->as<ArrayObject>().lengthIsWritable());
size_t initlen = obj->getDenseInitializedLength();
if (initlen > 0) {
/*
* At this point the length and initialized length have already been
* decremented and the result fetched, so just shift the array elements
* themselves.
*/
obj->moveDenseElementsNoPreBarrier(0, 1, initlen);
}
MOZ_ASSERT(initlen > 0);
/*
* At this point the length and initialized length have already been
* decremented and the result fetched, so just shift the array elements
* themselves.
*/
obj->moveDenseElementsNoPreBarrier(0, 1, initlen);
}
static inline void