Chromium Code Reviews| Index: Source/core/html/HTMLOptionsCollection.cpp |
| diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp |
| index 1b9c61989d690657f43387ff68b19730de456912..e2724df1c867b37e43aeb5bc2dfd19795a94dab3 100644 |
| --- a/Source/core/html/HTMLOptionsCollection.cpp |
| +++ b/Source/core/html/HTMLOptionsCollection.cpp |
| @@ -91,6 +91,8 @@ void HTMLOptionsCollection::setSelectedIndex(int index) |
| void HTMLOptionsCollection::setLength(unsigned length, ExceptionState& exceptionState) |
| { |
| + if (length > HTMLSelectElement::maxSelectItems) |
|
haraken
2015/08/18 13:27:12
Can we add a test case for this branch?
|
| + return; |
| toHTMLSelectElement(ownerNode()).setLength(length, exceptionState); |
| } |