Changeset 116864 in webkit
- Timestamp:
- May 12, 2012, 9:22:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/HTMLSelectElement/option-add-crash-expected.txt (added)
-
LayoutTests/fast/dom/HTMLSelectElement/option-add-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLSelectElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116860 r116864 1 2012-05-12 Abhishek Arya <inferno@chromium.org> 2 3 Crash in HTMLSelectElement::setOption 4 https://bugs.webkit.org/show_bug.cgi?id=85420 5 6 Reviewed by Eric Seidel. 7 8 * fast/dom/HTMLSelectElement/option-add-crash-expected.txt: Added. 9 * fast/dom/HTMLSelectElement/option-add-crash.html: Added. 10 1 11 2012-05-12 Philip Rogers <pdr@google.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r116863 r116864 1 2012-05-12 Abhishek Arya <inferno@chromium.org> 2 3 Crash in HTMLSelectElement::setOption 4 https://bugs.webkit.org/show_bug.cgi?id=85420 5 6 Reviewed by Eric Seidel 7 8 RefPtr before option in HTMLSelectElement::setOption since it 9 can get destroyed due to mutation events. 10 11 Test: fast/dom/HTMLSelectElement/option-add-crash.html 12 13 * html/HTMLSelectElement.cpp: 14 (WebCore::HTMLSelectElement::setOption): 15 1 16 2012-05-12 Robin Dunn <robin@alldunn.com> 2 17 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r116756 r116864 414 414 index = maxSelectItems - 1; 415 415 int diff = index - length(); 416 HTMLElement*before = 0;416 RefPtr<HTMLElement> before = 0; 417 417 // Out of array bounds? First insert empty dummies. 418 418 if (diff > 0) { … … 425 425 // Finally add the new element. 426 426 if (!ec) { 427 add(option, before , ec);427 add(option, before.get(), ec); 428 428 if (diff >= 0 && option->selected()) 429 429 optionSelectionStateChanged(option, true);
Note:
See TracChangeset
for help on using the changeset viewer.