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

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

Issue 10411076: Merge 116864 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/HTMLSelectElement/option-add-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLSelectElement.cpp
===================================================================
--- Source/WebCore/html/HTMLSelectElement.cpp (revision 118032)
+++ Source/WebCore/html/HTMLSelectElement.cpp (working copy)
@@ -413,7 +413,7 @@
if (index > maxSelectItems - 1)
index = maxSelectItems - 1;
int diff = index - length();
- HTMLElement* before = 0;
+ RefPtr<HTMLElement> before = 0;
// Out of array bounds? First insert empty dummies.
if (diff > 0) {
setLength(index, ec);
@@ -424,7 +424,7 @@
}
// Finally add the new element.
if (!ec) {
- add(option, before, ec);
+ add(option, before.get(), ec);
if (diff >= 0 && option->selected())
optionSelectionStateChanged(option, true);
}
« no previous file with comments | « LayoutTests/fast/dom/HTMLSelectElement/option-add-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698