diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index a99c0f1f5bb0..0cad8d019470 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -573,8 +573,7 @@ js::ArraySetLength(JSContext* cx, Handle arr, HandleId id, { RootedShape lengthShape(cx, arr->lookupPure(id)); MOZ_ASSERT(lengthShape); - MOZ_ASSERT_IF(lengthIsWritable, lengthShape->writable()); - MOZ_ASSERT_IF(lengthShape->writable() && !lengthIsWritable, arr->denseElementsAreFrozen()); + MOZ_ASSERT(lengthShape->writable() == lengthIsWritable); } #endif uint32_t oldLen = arr->length(); diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h index f1f7d0e8ea5c..3eb816bd850b 100644 --- a/js/src/vm/NativeObject.h +++ b/js/src/vm/NativeObject.h @@ -228,8 +228,7 @@ class ObjectElements flags &= ~CONVERT_DOUBLE_ELEMENTS; } bool hasNonwritableArrayLength() const { - return flags & NONWRITABLE_ARRAY_LENGTH || - flags & FROZEN; + return flags & NONWRITABLE_ARRAY_LENGTH; } void setNonwritableArrayLength() { MOZ_ASSERT(!isCopyOnWrite());