Bug 1057674 - Unget the token when parsing the filter property expects a function but doesn't find one. r=dbaron
authorMax Vujovic <mvujovic@adobe.com>
Mon, 25 Aug 2014 13:25:08 -0700
changeset 223124 236906d22acf6ae94b4b758c5abdd22fca8a2b6d
parent 223123 44c64dfad1e2d6551bdec5e87d28e0803e5f2ea8
child 223125 ab7a4493f8adab6287d370523d8e1b12d7f22849
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1057674
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057674 - Unget the token when parsing the filter property expects a function but doesn't find one. r=dbaron
layout/style/nsCSSParser.cpp
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -13776,16 +13776,17 @@ CSSParserImpl::ParseSingleFilter(nsCSSVa
 
   if (!GetToken(true)) {
     REPORT_UNEXPECTED_EOF(PEFilterEOF);
     return false;
   }
 
   if (mToken.mType != eCSSToken_Function) {
     REPORT_UNEXPECTED_TOKEN(PEExpectedNoneOrURLOrFilterFunction);
+    UngetToken();
     return false;
   }
 
   nsCSSKeyword functionName = nsCSSKeywords::LookupKeyword(mToken.mIdent);
   // Parse drop-shadow independently of the other filter functions
   // because of its more complex characteristics.
   if (functionName == eCSSKeyword_drop_shadow) {
     if (ParseDropShadow(aValue)) {