mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1312948: Put assertions in place to know we're not mutating the length when the array is frozen. r=nbp
MozReview-Commit-ID: 84X0Sgm7pGe Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
This commit is contained in:
parent
7a8a1e5e91
commit
3cc8730024
@ -23,6 +23,7 @@ inline void
|
||||
ArrayObject::setLength(ExclusiveContext* cx, uint32_t length)
|
||||
{
|
||||
MOZ_ASSERT(lengthIsWritable());
|
||||
MOZ_ASSERT_IF(length != getElementsHeader()->length, !denseElementsAreFrozen());
|
||||
|
||||
if (length > INT32_MAX) {
|
||||
/* Track objects with overflowing lengths in type information. */
|
||||
|
Loading…
Reference in New Issue
Block a user