Skip to content

Commit

Permalink
[MERGE #3322 @suwc] OS12507864: Correct assertion introduced in PR#3211
Browse files Browse the repository at this point in the history
Merge pull request #3322 from suwc:build/suwc/OS12507864

The assertions are intended to future-proof the assumption that
isInlineSegment being true implies segment swap.
#3211
  • Loading branch information
Suwei Chen committed Jul 12, 2017
2 parents 41eb19c + 66c97fc commit b6a9d9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Runtime/Library/JavascriptArray.inl
Expand Up @@ -866,7 +866,7 @@ SECOND_PASS:
}

startSeg = current;
Assert(startSeg == oldStartSeg || isInlineSegment);
Assert(startSeg != oldStartSeg || !isInlineSegment); // ensure isInlineSegment implies startSeg != oldStartSeg
if (isInlineSegment)
{
this->ClearElements(oldStartSeg, 0);
Expand Down Expand Up @@ -955,7 +955,7 @@ SECOND_PASS:
}
}

Assert(oldCurrent == current || isInlineSegment);
Assert(oldCurrent != current || !isInlineSegment); // ensure isInlineSegment implies oldCurrent != current
if (isInlineSegment)
{
this->ClearElements(oldCurrent, 0);
Expand Down

0 comments on commit b6a9d9d

Please sign in to comment.