diff options
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/jsarray.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 20284a047..913385f38 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -2828,7 +2828,7 @@ ArraySliceOrdinary(JSContext* cx, HandleObject obj, uint32_t length, uint32_t be MOZ_ASSERT(count >= narr->as<ArrayObject>().length()); narr->as<ArrayObject>().setLength(cx, count); - if (count > 0) { + if (count) { narr->as<NativeObject>().setDenseInitializedLength(begin + count); const Value* vp = obj->as<NativeObject>().getDenseElements() + begin; narr->as<NativeObject>().initDenseElements(begin, vp, count); |