summaryrefslogtreecommitdiffstats
path: root/js/src/jsarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsarray.cpp')
-rw-r--r--js/src/jsarray.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp
index 87d1a5acc..4ee967d4c 100644
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -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