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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 currentCharacter<SrcCharacterType>() += 3; 1474 currentCharacter<SrcCharacterType>() += 3;
1475 m_token = SGML_CD; 1475 m_token = SGML_CD;
1476 } 1476 }
1477 break; 1477 break;
1478 1478
1479 case CharacterAt: 1479 case CharacterAt:
1480 if (isIdentifierStart<SrcCharacterType>()) { 1480 if (isIdentifierStart<SrcCharacterType>()) {
1481 m_token = ATKEYWORD; 1481 m_token = ATKEYWORD;
1482 ++result; 1482 ++result;
1483 parseIdentifier(result, resultString, hasEscape); 1483 parseIdentifier(result, resultString, hasEscape);
1484 detectAtToken<SrcCharacterType>(result - tokenStart<SrcCharacterType >(), hasEscape); 1484 // The standard enables unicode escapes in at-rules. In this case on ly the resultString will contain the
1485 // correct identifier, hence we have to use it to determine its leng th instead of the usual pointer arithmetic.
1486 detectAtToken<SrcCharacterType>(resultString.length() + 1, hasEscape );
1485 } 1487 }
1486 break; 1488 break;
1487 1489
1488 case CharacterBackSlash: 1490 case CharacterBackSlash:
1489 if (isCSSEscape(*currentCharacter<SrcCharacterType>())) { 1491 if (isCSSEscape(*currentCharacter<SrcCharacterType>())) {
1490 --currentCharacter<SrcCharacterType>(); 1492 --currentCharacter<SrcCharacterType>();
1491 parseIdentifier(result, yylval->string, hasEscape); 1493 parseIdentifier(result, yylval->string, hasEscape);
1492 m_token = IDENT; 1494 m_token = IDENT;
1493 } 1495 }
1494 break; 1496 break;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 m_dataStart16[length - 1] = 0; 1582 m_dataStart16[length - 1] = 0;
1581 1583
1582 m_is8BitSource = false; 1584 m_is8BitSource = false;
1583 m_currentCharacter8 = 0; 1585 m_currentCharacter8 = 0;
1584 m_currentCharacter16 = m_dataStart16.get(); 1586 m_currentCharacter16 = m_dataStart16.get();
1585 setTokenStart<UChar>(m_currentCharacter16); 1587 setTokenStart<UChar>(m_currentCharacter16);
1586 m_lexFunc = &CSSTokenizer::realLex<UChar>; 1588 m_lexFunc = &CSSTokenizer::realLex<UChar>;
1587 } 1589 }
1588 1590
1589 } // namespace WebCore 1591 } // namespace WebCore
OLDNEW
« 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