diff --git a/js/src/vm/UnboxedObject-inl.h b/js/src/vm/UnboxedObject-inl.h index 7e735c357281..93ad7bf28a58 100644 --- a/js/src/vm/UnboxedObject-inl.h +++ b/js/src/vm/UnboxedObject-inl.h @@ -478,6 +478,9 @@ SetOrExtendBoxedOrUnboxedDenseElements(ExclusiveContext* cx, JSObject* obj, if (Type == JSVAL_TYPE_MAGIC) { NativeObject* nobj = &obj->as(); + if (nobj->denseElementsAreFrozen()) + return DenseElementResult::Incomplete; + if (obj->is() && !obj->as().lengthIsWritable() && start + count >= obj->as().length())