[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

inferno at chromium.org inferno at chromium.org
Wed Dec 22 16:26:39 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 19619a92eebc46eb41273f607669acf314f2a049
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 23 21:34:29 2010 +0000

    2010-11-23  Abhishek Arya  <inferno at 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 at 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

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b89cb84..499d4db 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-23  Abhishek Arya  <inferno at 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 at gmail.com>
 
         Unreviewed, rolling out r72618.
diff --git a/LayoutTests/compositing/overflow/get-transform-from-non-box-container-expected.txt b/LayoutTests/http/tests/eventsource/eventsource-status-error-iframe-crash-expected.txt
similarity index 100%
copy from LayoutTests/compositing/overflow/get-transform-from-non-box-container-expected.txt
copy to LayoutTests/http/tests/eventsource/eventsource-status-error-iframe-crash-expected.txt
diff --git a/LayoutTests/http/tests/eventsource/eventsource-status-error-iframe-crash.html b/LayoutTests/http/tests/eventsource/eventsource-status-error-iframe-crash.html
new file mode 100644
index 0000000..172394f
--- /dev/null
+++ b/LayoutTests/http/tests/eventsource/eventsource-status-error-iframe-crash.html
@@ -0,0 +1,27 @@
+<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>
diff --git a/LayoutTests/http/tests/eventsource/resources/request-status-error.htm b/LayoutTests/http/tests/eventsource/resources/request-status-error.htm
new file mode 100644
index 0000000..1a19525
--- /dev/null
+++ b/LayoutTests/http/tests/eventsource/resources/request-status-error.htm
@@ -0,0 +1,16 @@
+<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>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6e820c4..0a238e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-11-23  Abhishek Arya  <inferno at 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 at gmail.com>
 
         Unreviewed, rolling out r72618.
diff --git a/WebCore/page/EventSource.cpp b/WebCore/page/EventSource.cpp
index a7c715a..b0b07aa 100644
--- a/WebCore/page/EventSource.cpp
+++ b/WebCore/page/EventSource.cpp
@@ -120,6 +120,9 @@ void EventSource::connect()
 
 void EventSource::endRequest()
 {
+    if (!m_requestInFlight)
+        return;
+
     m_requestInFlight = false;
 
     if (!m_failSilently)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list