Commit 19619a92 authored by inferno@chromium.org's avatar inferno@chromium.org

2010-11-23 Abhishek Arya <inferno@chromium.org>

        Reviewed by Adam Barth.

        dispatchEvent call in EventSource endRequest can lead to calling endRequest
        again which frees up the pending activity. Make sure we have request in flight
        to prevent that from happening.
        https://bugs.webkit.org/show_bug.cgi?id=49448

        Test: http/tests/eventsource/eventsource-status-error-iframe-crash.html

        * page/EventSource.cpp:
        (WebCore::EventSource::endRequest):
        (WebCore::EventSource::close):
2010-11-23  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Adam Barth.

        Tests that we do not crash on EventSource status errors inside an iframe.
        https://bugs.webkit.org/show_bug.cgi?id=49448

        * http/tests/eventsource/eventsource-status-error-iframe-crash-expected.txt: Added.
        * http/tests/eventsource/eventsource-status-error-iframe-crash.html: Added.
        * http/tests/eventsource/resources/request-status-error.htm: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3a3d94cb
2010-11-23 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
Tests that we do not crash on EventSource status errors inside an iframe.
https://bugs.webkit.org/show_bug.cgi?id=49448
* http/tests/eventsource/eventsource-status-error-iframe-crash-expected.txt: Added.
* http/tests/eventsource/eventsource-status-error-iframe-crash.html: Added.
* http/tests/eventsource/resources/request-status-error.htm: Added.
2010-11-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r72618.
<html>
<iframe id="test"></iframe>
<div id="result"></div>
<script>
if (window.layoutTestController)
{
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function runTest()
{
document.getElementById("test").src = "resources/request-status-error.htm";
}
function finish()
{
document.body.removeChild(document.getElementById("test"));
document.getElementById("result").innerHTML = "PASS";
if (window.layoutTestController)
layoutTestController.notifyDone();
}
runTest();
</script>
<html>
<html>
<body>
<script>
function statusTest(status) {
var source = new EventSource("status-code.php?status=" + status);
source.onerror = function() {
top.finish();
}
}
statusTest("404");
statusTest("410");
statusTest("503");
</script>
</body>
</html>
2010-11-23 Abhishek Arya <inferno@chromium.org>
Reviewed by Adam Barth.
dispatchEvent call in EventSource endRequest can lead to calling endRequest
again which frees up the pending activity. Make sure we have request in flight
to prevent that from happening.
https://bugs.webkit.org/show_bug.cgi?id=49448
Test: http/tests/eventsource/eventsource-status-error-iframe-crash.html
* page/EventSource.cpp:
(WebCore::EventSource::endRequest):
(WebCore::EventSource::close):
2010-11-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r72618.
......@@ -120,6 +120,9 @@ void EventSource::connect()
void EventSource::endRequest()
{
if (!m_requestInFlight)
return;
m_requestInFlight = false;
if (!m_failSilently)
......
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