summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/TokenStream.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 15:54:42 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:17 -0400
commit0ed4cf321f276d88f80d13daf2644f9bc51b0957 (patch)
tree41620b1fff47407e2538a3db288b2b974c0b904b /js/src/frontend/TokenStream.h
parentd400e9491c0be93f34f368227d6a3e4d056d9061 (diff)
downloadUXP-0ed4cf321f276d88f80d13daf2644f9bc51b0957.tar
UXP-0ed4cf321f276d88f80d13daf2644f9bc51b0957.tar.gz
UXP-0ed4cf321f276d88f80d13daf2644f9bc51b0957.tar.lz
UXP-0ed4cf321f276d88f80d13daf2644f9bc51b0957.tar.xz
UXP-0ed4cf321f276d88f80d13daf2644f9bc51b0957.zip
1326454 - Make TokenStream::skipChars{,IgnoreEOL} accept an unsigned integral number of chars to skip.
Diffstat (limited to 'js/src/frontend/TokenStream.h')
-rw-r--r--js/src/frontend/TokenStream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h
index e0e4b959e..a058759c6 100644
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -972,7 +972,7 @@ class MOZ_STACK_CLASS TokenStream
MOZ_MUST_USE bool getDirectives(bool isMultiline, bool shouldWarnDeprecated);
MOZ_MUST_USE bool getDirective(bool isMultiline, bool shouldWarnDeprecated,
- const char* directive, int directiveLength,
+ const char* directive, uint8_t directiveLength,
const char* errorMsgPragma,
UniquePtr<char16_t[], JS::FreePolicy>* destination);
MOZ_MUST_USE bool getDisplayURL(bool isMultiline, bool shouldWarnDeprecated);
@@ -996,13 +996,13 @@ class MOZ_STACK_CLASS TokenStream
return true;
}
- void skipChars(int n) {
- while (--n >= 0)
+ void skipChars(uint8_t n) {
+ while (n-- > 0)
getChar();
}
- void skipCharsIgnoreEOL(int n) {
- while (--n >= 0)
+ void skipCharsIgnoreEOL(uint8_t n) {
+ while (n-- > 0)
getCharIgnoreEOL();
}