occasional crash in Chromium in dispatching keyEvent

https://bugs.webkit.org/show_bug.cgi?id=67941

Patch by Scott Graham <scottmg@chromium.org> on 2011-10-04
Reviewed by Tony Chang.

Source/WebKit/chromium:

Guard Frame while handling keyEvent, as it can lose last reference due
to actions of handler.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::keyEvent):

LayoutTests:

* fast/events/keyevent-iframe-removed-crash-expected.txt: Added.
* fast/events/keyevent-iframe-removed-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c83ee4ee
2011-10-04 Scott Graham <scottmg@chromium.org>
occasional crash in Chromium in dispatching keyEvent
https://bugs.webkit.org/show_bug.cgi?id=67941
Reviewed by Tony Chang.
* fast/events/keyevent-iframe-removed-crash-expected.txt: Added.
* fast/events/keyevent-iframe-removed-crash.html: Added.
2011-10-04 Adam Barth <abarth@webkit.org>
Update XP results for the font shaping patch.
This test passes if it does not crash. Move the mouse out of the window, and then press any key.
PASS
<!DOCTYPE html>
<html>
<head>
<script>
function go() {
var fr = document.createElement('iframe');
fr.id = "blorp";
document.body.appendChild(fr);
fr.contentDocument.body.innerHTML = '<p id="a">move mouse out of the window, and press a key</p>';
fr.contentDocument.body.onkeydown = function(e) {
e.preventDefault();
document.body.removeChild(fr);
};
fr.focus();
if (window.layoutTestController)
{
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
setTimeout(nuke, 0);
}
}
function nuke() {
eventSender.keyDown("x")
layoutTestController.notifyDone();
}
</script>
</head>
<body onload="go()">
<p>
This test passes if it does not crash. Move the mouse out
of the window, and then press any key.
</p>
<p>
PASS
</p>
</body>
</html>
2011-10-04 Scott Graham <scottmg@chromium.org>
occasional crash in Chromium in dispatching keyEvent
https://bugs.webkit.org/show_bug.cgi?id=67941
Reviewed by Tony Chang.
Guard Frame while handling keyEvent, as it can lose last reference due
to actions of handler.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::keyEvent):
2011-10-04 Anders Carlsson <andersca@apple.com>
Remove PlatformWheelEvent::m_isAccepted
......
......@@ -624,7 +624,7 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
if (autocompleteHandleKeyEvent(event))
return true;
Frame* frame = focusedWebCoreFrame();
RefPtr<Frame> frame = focusedWebCoreFrame();
if (!frame)
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment