diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-23 11:33:50 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-23 11:33:50 +0100 |
commit | be16123ddcaf061afced444a6db7d5b55020b744 (patch) | |
tree | 988db89be0d2274b273b235e0b411e5bdf7f55e0 /js | |
parent | 5ee844f71001af821244696414bd92973f78fc09 (diff) | |
download | UXP-be16123ddcaf061afced444a6db7d5b55020b744.tar UXP-be16123ddcaf061afced444a6db7d5b55020b744.tar.gz UXP-be16123ddcaf061afced444a6db7d5b55020b744.tar.lz UXP-be16123ddcaf061afced444a6db7d5b55020b744.tar.xz UXP-be16123ddcaf061afced444a6db7d5b55020b744.zip |
Revert "Issue #1382 - Remove invalid assertion."
This reverts commit 9c6a8450b3e96442035b84025b0dd13be3a9e5f8.
Diffstat (limited to 'js')
-rw-r--r-- | js/src/jsarray.cpp | 17 |
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 |