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

Unified Diff: Source/core/html/HTMLSelectElement.cpp

Issue 799343002: Fix hitting assert when opening a select menu with no options (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index d44db4e8a8612bc7bdb78ff28c9f57618c271100..89425d7a02c13e1bd9b3caf212f93a8a12110fca 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -1205,10 +1205,6 @@ void HTMLSelectElement::handlePopupOpenKeyboardEvent(Event* event)
saveLastSelection();
if (RenderMenuList* menuList = toRenderMenuList(renderer()))
menuList->showPopup();
- int index = selectedIndex();
- ASSERT(index >= 0);
- ASSERT_WITH_SECURITY_IMPLICATION(index < static_cast<int>(listItems().size()));
- setSelectedIndex(index);
tkent 2014/12/15 08:56:25 Hmm, setSelectedIndex(selectedIndex()) looks to do
keishi 2014/12/15 09:01:21 Yup
event->setDefaultHandled();
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698