Resolve crash in FrameLoader::checkTimerFired.

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

Patch by Chris Palmer <palmer@google.com> on 2012-02-07
Reviewed by Eric Seidel.

Source/WebCore:

Test is LayoutTests/http/tests/appcache/deferred-events-delete-while-raising-timer.html.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkTimerFired):

LayoutTests:

* http/tests/appcache/deferred-events-delete-while-raising-timer-expected.txt: Added.
* http/tests/appcache/deferred-events-delete-while-raising-timer.html: Added.
* http/tests/appcache/resources/deferred-events-delete-while-raising-timer-1.html: Added.
* http/tests/appcache/resources/deferred-events-delete-while-raising-timer-2.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 51f0d5fe
2012-02-07 Chris Palmer <palmer@google.com>
Resolve crash in FrameLoader::checkTimerFired.
https://bugs.webkit.org/show_bug.cgi?id=77907
Reviewed by Eric Seidel.
* http/tests/appcache/deferred-events-delete-while-raising-timer-expected.txt: Added.
* http/tests/appcache/deferred-events-delete-while-raising-timer.html: Added.
* http/tests/appcache/resources/deferred-events-delete-while-raising-timer-1.html: Added.
* http/tests/appcache/resources/deferred-events-delete-while-raising-timer-2.html: Added.
2012-02-07 David Barton <dbarton@mathscribe.com>
Remove extraneous MathML code before bug 52444 fix
Test the destruction of an iframe while deferred events are being raised does not crash the system.
SUCCESS
<html>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
window.onmessage = function() {
document.getElementById('result').innerHTML = "SUCCESS";
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function killChildFrame() {
document.body.removeChild(document.getElementsByTagName("iframe")[0]);
}
</script>
<p>Test the destruction of an iframe while deferred events are being raised does not crash the system.</p>
<div id="result">FAILURE</div>
<iframe src="resources/deferred-events-delete-while-raising-timer-1.html"></iframe>
</html>
<html manifest="THIS_FILE_DOES_NOT_EXIST.manifest">
<script src="THIS_FILE_DOES_NOT_EXIST.js"></script>
<script>
window.applicationCache.onchecking = function() {
parent.postMessage("hello", "*");
parent.killChildFrame();
}
function killChildFrame() {
document.body.removeChild(document.getElementsByTagName("iframe")[0]);
}
</script>
<iframe src="deferred-events-delete-while-raising-timer-2.html"></iframe>
</html>
<html manifest="THIS_FILE_DOES_NOT_EXIST.manifest">
<script src="THIS_FILE_DOES_NOT_EXIST.js"></script>
<script>
window.applicationCache.onchecking = function() {
parent.killChildFrame();
}
</script>
</html>
2012-02-07 Chris Palmer <palmer@google.com>
Resolve crash in FrameLoader::checkTimerFired.
https://bugs.webkit.org/show_bug.cgi?id=77907
Reviewed by Eric Seidel.
Test is LayoutTests/http/tests/appcache/deferred-events-delete-while-raising-timer.html.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkTimerFired):
2012-02-07 Yong Li <yoli@rim.com>
[BlackBerry] NetworkJob should stop redirecting when the request is cleared by client
......@@ -750,6 +750,8 @@ void FrameLoader::checkCompleted()
void FrameLoader::checkTimerFired(Timer<FrameLoader>*)
{
RefPtr<Frame> protect(m_frame);
if (Page* page = m_frame->page()) {
if (page->defersLoading())
return;
......
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