Skip to content

Commit da76bcf

Browse files
iamstoliswoess
authored andcommitted
Avoiding a potential AssertionError from array hole counting.
1 parent da16ad5 commit da76bcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/array/dyn/AbstractWritableArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,8 @@ ScriptArray addRangeImplContiguous(JSDynamicObject object, long offset, int size
684684
if (isHolesType()) {
685685
arraySetHoleCount(object, arrayGetHoleCount(object) + size);
686686
}
687+
arraySetUsedLength(object, usedLength + size);
687688
}
688-
arraySetUsedLength(object, usedLength + size);
689689
return this;
690690
} else {
691691
return addRangeGrow(object, array, arrayLength, usedLength, lengthInt(object), (int) (offset - indexOffset), size, arrayOffset, indexOffset);

0 commit comments

Comments
 (0)