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

Side by Side Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 308733005: Fix assert on unknown rule type in the BisonCSSParser::endRuleHeader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « Source/core/css/MediaQuerySetTest.cpp ('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 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 m_ruleHeaderStartLineNumber = m_tokenizer.m_tokenStartLineNumber; 2003 m_ruleHeaderStartLineNumber = m_tokenizer.m_tokenStartLineNumber;
2004 if (m_observer) { 2004 if (m_observer) {
2005 ASSERT(!m_ruleHasHeader); 2005 ASSERT(!m_ruleHasHeader);
2006 m_observer->startRuleHeader(ruleType, m_ruleHeaderStartOffset); 2006 m_observer->startRuleHeader(ruleType, m_ruleHeaderStartOffset);
2007 m_ruleHasHeader = true; 2007 m_ruleHasHeader = true;
2008 } 2008 }
2009 } 2009 }
2010 2010
2011 void BisonCSSParser::endRuleHeader() 2011 void BisonCSSParser::endRuleHeader()
2012 { 2012 {
2013 ASSERT(m_ruleHeaderType != CSSRuleSourceData::UNKNOWN_RULE); 2013 if (m_ruleHeaderType == CSSRuleSourceData::UNKNOWN_RULE)
Julien - ping for review 2014/06/06 20:13:06 I don't think it's the right fix: we shouldn't be
2014 return;
2015
2014 m_ruleHeaderType = CSSRuleSourceData::UNKNOWN_RULE; 2016 m_ruleHeaderType = CSSRuleSourceData::UNKNOWN_RULE;
2015 if (m_observer) { 2017 if (m_observer) {
2016 ASSERT(m_ruleHasHeader); 2018 ASSERT(m_ruleHasHeader);
2017 m_observer->endRuleHeader(m_tokenizer.safeUserStringTokenOffset()); 2019 m_observer->endRuleHeader(m_tokenizer.safeUserStringTokenOffset());
2018 } 2020 }
2019 } 2021 }
2020 2022
2021 void BisonCSSParser::startSelector() 2023 void BisonCSSParser::startSelector()
2022 { 2024 {
2023 if (m_observer) 2025 if (m_observer)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 rule->setProperties(createStylePropertySet()); 2071 rule->setProperties(createStylePropertySet());
2070 clearProperties(); 2072 clearProperties();
2071 2073
2072 StyleRuleViewport* result = rule.get(); 2074 StyleRuleViewport* result = rule.get();
2073 m_parsedRules.append(rule.release()); 2075 m_parsedRules.append(rule.release());
2074 2076
2075 return result; 2077 return result;
2076 } 2078 }
2077 2079
2078 } 2080 }
OLDNEW
« no previous file with comments | « Source/core/css/MediaQuerySetTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698