mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09: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:
parent
27e66e3f82
commit
2b4e577d8e
1 changed files with 1 additions and 5 deletions
|
|
@ -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--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue