Bug 148410 - Fix crash due to search field disappearing when showing results menu
Summary: Fix crash due to search field disappearing when showing results menu
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-24 18:25 PDT by Wenson Hsieh
Modified: 2015-08-25 11:00 PDT (History)
2 users (show)

See Also:


Attachments
Click on the results button to crash WebKit (327 bytes, text/html)
2015-08-24 18:25 PDT, Wenson Hsieh
no flags Details
Patch (3.74 KB, patch)
2015-08-24 22:49 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (4.96 KB, patch)
2015-08-25 09:21 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2015-08-24 18:25:44 PDT
Created attachment 259800 [details]
Click on the results button to crash WebKit

When an input of type search has a results attribute and is set up to disappear (e.g. display: none) when focused, clicking on the search field will crash WebKit since we assume that, after running the handler code, the search field's renderer will still exist. We use the renderer to then toggle the search results popup. This fix guards this logic with a check to make sure that the renderer still exists when handling an event on the search field results button.
Comment 1 Wenson Hsieh 2015-08-24 18:26:17 PDT
<rdar://problem/22399850>
Comment 2 Wenson Hsieh 2015-08-24 22:49:09 PDT
Created attachment 259827 [details]
Patch
Comment 3 Wenson Hsieh 2015-08-25 09:21:38 PDT
Created attachment 259852 [details]
Patch
Comment 4 Brent Fulgham 2015-08-25 10:48:54 PDT
Comment on attachment 259852 [details]
Patch

Very nice! r=me.
Comment 5 WebKit Commit Bot 2015-08-25 11:00:18 PDT
Comment on attachment 259852 [details]
Patch

Clearing flags on attachment: 259852

Committed r188918: <http://trac.webkit.org/changeset/188918>
Comment 6 WebKit Commit Bot 2015-08-25 11:00:21 PDT
All reviewed patches have been landed.  Closing bug.