Skip to content

Commit b6a9d9d

Browse files
author
Suwei Chen
committed
[MERGE chakra-core#3322 @suwc] OS12507864: Correct assertion introduced in PR#3211
Merge pull request chakra-core#3322 from suwc:build/suwc/OS12507864 The assertions are intended to future-proof the assumption that isInlineSegment being true implies segment swap. chakra-core#3211
2 parents 41eb19c + 66c97fc commit b6a9d9d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Runtime/Library/JavascriptArray.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ SECOND_PASS:
866866
}
867867

868868
startSeg = current;
869-
Assert(startSeg == oldStartSeg || isInlineSegment);
869+
Assert(startSeg != oldStartSeg || !isInlineSegment); // ensure isInlineSegment implies startSeg != oldStartSeg
870870
if (isInlineSegment)
871871
{
872872
this->ClearElements(oldStartSeg, 0);
@@ -955,7 +955,7 @@ SECOND_PASS:
955955
}
956956
}
957957

958-
Assert(oldCurrent == current || isInlineSegment);
958+
Assert(oldCurrent != current || !isInlineSegment); // ensure isInlineSegment implies oldCurrent != current
959959
if (isInlineSegment)
960960
{
961961
this->ClearElements(oldCurrent, 0);

0 commit comments

Comments
 (0)