Chromium Code Reviews| Index: Source/core/css/StylePropertySet.h |
| diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h |
| index 725257f14dc21326513f34d0f33830dd439e3559..8e9c913568e04c9741be2b1f0a5ec6b577769a8f 100644 |
| --- a/Source/core/css/StylePropertySet.h |
| +++ b/Source/core/css/StylePropertySet.h |
| @@ -124,6 +124,9 @@ public: |
| bool propertyMatches(CSSPropertyID, const CSSValue*) const; |
| protected: |
| + |
| + enum { MaxArraySize = (1 << 28) - 1 }; |
| + |
| StylePropertySet(CSSParserMode cssParserMode) |
| : m_cssParserMode(cssParserMode) |
| , m_isMutable(true) |
| @@ -133,12 +136,12 @@ protected: |
| StylePropertySet(CSSParserMode cssParserMode, unsigned immutableArraySize) |
| : m_cssParserMode(cssParserMode) |
| , m_isMutable(false) |
| - , m_arraySize(immutableArraySize) |
| + , m_arraySize(std::min(immutableArraySize, unsigned(MaxArraySize))) |
|
eseidel
2013/09/17 16:28:55
Do we have any asserts on array modification which
rune
2013/09/17 20:17:03
So, m_arraySize won't change after the initializat
rune
2013/09/17 20:40:41
Done.
|
| { } |
| - unsigned m_cssParserMode : 2; |
| + unsigned m_cssParserMode : 3; |
| mutable unsigned m_isMutable : 1; |
| - unsigned m_arraySize : 29; |
| + unsigned m_arraySize : 28; |
| friend class PropertySetCSSStyleDeclaration; |
| }; |