If a WebView is set to close using the Enter Key (if it was a dialog that closes when you press enter), it can crash when closed this way. The FrameView isn't protected in EventHandler::keyEvent, like it is in EventHandler::handleMousePressEvent, EventHandler::handleMouseDoubleClickEvent, EventHandler::handleMouseMoveEvent, EventHandler::handleMouseReleaseEvent, and EventHandler::handleWheelEvent. <rdar://problem/9044756>
Created attachment 87249 [details] [PATCH] Fix
Comment on attachment 87249 [details] [PATCH] Fix It’s not at all clear why we protect the FrameView and not some other reference-counted object.
(In reply to comment #2) > (From update of attachment 87249 [details]) > It’s not at all clear why we protect the FrameView and not some other reference-counted object. I'm not sure either. I was going by existing style w/ other functions in the class + it fixed the crash. I can talk to someone about it later tonight or in the morning before landing.
Comment on attachment 87249 [details] [PATCH] Fix Is it possible to make a test for this? If not a test for run-webkit-tests, then maybe one for run-api-tests?
(In reply to comment #4) > (From update of attachment 87249 [details]) > Is it possible to make a test for this? If not a test for run-webkit-tests, then maybe one for run-api-tests? I tried making a test that opens a window using window.open, and that window is closed by any key-press, but that didn't reproduce the crash.
> I tried making a test that opens a window using window.open, and that window is closed by any key-press, but that didn't reproduce the crash. Not sure if it's worth spending more time on this, but the inability to make a test suggests that there is some general difference between normal web views and those the problem was observed with, and that difference would be good to find and eliminate.
Adding some additional steps to reproduce: 1) Go to any page (http://reddit.com - was used for testing). 2) Click the + button in the URL field, to add a bookmark 3) Press Enter to close the "Add Bookmark" Dialog
Landed in r82487.