Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: Source/core/css/CSSTokenizer-in.cpp

Issue 241053002: ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSTokenizer::detectAtToken (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/css/atrule-with-escape-character-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSTokenizer-in.cpp
diff --git a/Source/core/css/CSSTokenizer-in.cpp b/Source/core/css/CSSTokenizer-in.cpp
index 58a30bc4a0b9ac7c2cd3b44e3ae892e1fb3e3d39..46370a90c985b19530724703169109f26ac49d43 100644
--- a/Source/core/css/CSSTokenizer-in.cpp
+++ b/Source/core/css/CSSTokenizer-in.cpp
@@ -1481,7 +1481,9 @@ restartAfterComment:
m_token = ATKEYWORD;
++result;
parseIdentifier(result, resultString, hasEscape);
- detectAtToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>(), hasEscape);
+ // The standard enables unicode escapes in at-rules. In this case only the resultString will contain the
+ // correct identifier, hence we have to use it to determine its length instead of the usual pointer arithmetic.
+ detectAtToken<SrcCharacterType>(resultString.length() + 1, hasEscape);
}
break;
« no previous file with comments | « LayoutTests/fast/css/atrule-with-escape-character-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698