mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Remove unnecessary assertion in the ArrayObject's setArrayLength function (#34)
There's no need to put an assertion there because: - The ArrayObject's length can be changed even when it's not extensible, it just fills the Array with empty values. - Modifying the length of an ArrayObject should not throw an error, the only time it should when an element is pushed to a non-extensible ArrayObject. Fixes #33 Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
parent
8f6925acc7
commit
51f10cbe7b
1 changed files with 0 additions and 2 deletions
|
|
@ -266,8 +266,6 @@ void ArrayObject::convertIntoNonFastMode(ExecutionState& state)
|
|||
|
||||
bool ArrayObject::setArrayLength(ExecutionState& state, const uint64_t& newLength)
|
||||
{
|
||||
ASSERT(isExtensible() || newLength <= getArrayLength(state));
|
||||
|
||||
if (UNLIKELY(isFastModeArray() && (newLength > ESCARGOT_ARRAY_NON_FASTMODE_MIN_SIZE))) {
|
||||
uint32_t orgLength = getArrayLength(state);
|
||||
if (newLength > orgLength) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue