Bug 1478587 - Invoke TokenStreamChars::getNonAsciiCodePointDontNormalize passing CharT lead (not int32_t). r=arai

--HG--
extra : rebase_source : ea3053e8c30c0a529d24fce114208ee3e1215638
This commit is contained in:
Jeff Walden 2018-07-25 20:11:01 -07:00
Родитель 051e9a8579
Коммит 9ff73c6e06
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1828,7 +1828,7 @@ TokenStreamSpecific<CharT, AnyCharsAccess>::putIdentInCharBuffer(const CharT* id
// |restoreNextRawCharAddress| undoes all gets, and this function
// doesn't update line/column info.
char32_t cp;
if (!getNonAsciiCodePointDontNormalize(unit, &cp))
if (!getNonAsciiCodePointDontNormalize(toCharT(unit), &cp))
return false;
codePoint = cp;
@ -2151,7 +2151,7 @@ TokenStreamSpecific<CharT, AnyCharsAccess>::regexpLiteral(TokenStart start, Toke
MOZ_ASSERT(!this->isAsciiCodePoint(lead));
char32_t codePoint;
if (!this->getNonAsciiCodePointDontNormalize(lead, &codePoint))
if (!this->getNonAsciiCodePointDontNormalize(this->toCharT(lead), &codePoint))
return false;
if (MOZ_UNLIKELY(codePoint == unicode::LINE_SEPARATOR ||

Просмотреть файл

@ -2315,6 +2315,7 @@ class MOZ_STACK_CLASS TokenStreamSpecific
using GeneralCharsBase::newSimpleToken;
using CharsBase::peekCodeUnit;
// Deliberately don't |using| |sourceUnits| because of bug 1472569. :-(
using CharsBase::toCharT;
using GeneralCharsBase::ungetCodeUnit;
using GeneralCharsBase::updateLineInfoForEOL;