1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

No issue - Fix asserts in debug.

Hashbang parser changes allow more than one EOL which screws up these
assertions' premise. Just remove them as the preconditions are no longer
valid.
This commit is contained in:
Moonchild
2024-09-19 19:04:22 +02:00
committed by roytam1
parent 27e66e3f82
commit 2b4e577d8e
+1 -5
View File
@@ -362,10 +362,7 @@ TokenStream::SourceCoords::add(uint32_t lineNum, uint32_t lineStartOffset)
lineStartOffsets_[lineIndex] = lineStartOffset;
} else {
// We have seen this newline before (and ungot it). Do nothing (other
// than checking it hasn't mysteriously changed).
// This path can be executed after hitting OOM, so check lineIndex.
MOZ_ASSERT_IF(lineIndex < sentinelIndex, lineStartOffsets_[lineIndex] == lineStartOffset);
// We have seen this newline before (and ungot it). Do nothing.
}
return true;
}
@@ -615,7 +612,6 @@ TokenStream::ungetChar(int32_t c)
if (!userbuf.atStart())
userbuf.matchRawCharBackwards('\r');
MOZ_ASSERT(prevLinebase != size_t(-1)); // we should never get more than one EOL char
linebase = prevLinebase;
prevLinebase = size_t(-1);
lineno--;