Summary: | [Stable] [GTK] Crash in WebCore::HTMLSelectElement::selectedIndex | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Martin Robinson <mrobinson> | ||||||
Component: | WebKitGTK | Assignee: | Mario Sanchez Prada <mario> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Critical | CC: | cgarcia, jdiggs, mario, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Martin Robinson
2012-08-31 15:49:05 PDT
Created attachment 161899 [details]
Patch proposal
Simple patch to fix this issue, by protecting us against the situation exposed here: a selector which is not rendered through a HTML <select> element.
I propose this patch because the current code was assuming that was the case (a HTML <select> element was always there), which seems to be plainly wrong, as this situation clearly exposes. Of course, some better improvements could be done (e.g. supporting WAI-ARIA selectors), but I think the focus should be now put on fixing this crash, and so that's what this patch does, by ensuring we only emit the signal when such an assumption is right.
Comment on attachment 161899 [details]
Patch proposal
Great work!! Is it easy to reproduce this crash? Perhaps we could add a simple test case?
Created attachment 161992 [details]
Patch proposal + Layout test
Good idea. I'm attaching a new patch with a simple test case that crashes without the patch (and obviously doesn't with it)
Comment on attachment 161992 [details] Patch proposal + Layout test View in context: https://bugs.webkit.org/attachment.cgi?id=161992&action=review Great! Do you mind adding this to the list at: https://trac.webkit.org/wiki/WebKitGTK/1.10.x ? > LayoutTests/platform/gtk/accessibility/aria-listbox-crash.html:34 > + window.setTimeout("testRunner.notifyDone()",0); Just a little nit here: you're missing a space after the comma, I think. Comment on attachment 161992 [details] Patch proposal + Layout test Clearing flags on attachment: 161992 Committed r127466: <http://trac.webkit.org/changeset/127466> All reviewed patches have been landed. Closing bug. (In reply to comment #4) > (From update of attachment 161992 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=161992&action=review > > Great! Do you mind adding this to the list at: https://trac.webkit.org/wiki/WebKitGTK/1.10.x ? Already did yesterday. > > LayoutTests/platform/gtk/accessibility/aria-listbox-crash.html:34 > > + window.setTimeout("testRunner.notifyDone()",0); > > Just a little nit here: you're missing a space after the comma, I think. Sure, sorry about it. Anyway, now the patch has been already committed so I think it makes no sense to commit a "fix" just for that "issue" :) Thanks |