[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:47:01 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit ea1b302b1bcc9cc242dd507897effae2332e3b22
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Oct 18 06:27:17 2009 +0000

    2009-10-17  Yuta Kitamura  <yutak at chromium.org>
    
            Reviewed by Darin Adler.
    
            Fix inefficient string concatenation.
    
            LayoutTests/fast/css/large-list-of-rules-crash.html contains code that
            concatenate strings in an inefficient way. Concatenation of strings should be
            done with Array.join method. This patch fixes this issue, and also fixes typos
            in the test.
    
            fast/css/large-list-of-rules-crash.html concatenates strings in an inefficient way
            https://bugs.webkit.org/show_bug.cgi?id=30436
    
            * fast/css/large-list-of-rules-crash.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49748 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d55fa60..25bb2b7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-17  Yuta Kitamura  <yutak at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Fix inefficient string concatenation.
+        
+        LayoutTests/fast/css/large-list-of-rules-crash.html contains code that
+        concatenate strings in an inefficient way. Concatenation of strings should be
+        done with Array.join method. This patch fixes this issue, and also fixes typos
+        in the test.
+
+        fast/css/large-list-of-rules-crash.html concatenates strings in an inefficient way
+        https://bugs.webkit.org/show_bug.cgi?id=30436
+
+        * fast/css/large-list-of-rules-crash.html:
+
 2009-10-17  Pavel Feldman  <pfeldman at chromium.org>
 
         Not reviewed: reduce inspector console test size - it times out.
diff --git a/LayoutTests/fast/css/large-list-of-rules-crash.html b/LayoutTests/fast/css/large-list-of-rules-crash.html
index 51ba4bc..d48dff4 100644
--- a/LayoutTests/fast/css/large-list-of-rules-crash.html
+++ b/LayoutTests/fast/css/large-list-of-rules-crash.html
@@ -3,10 +3,11 @@
   "http://www.w3.org/TR/html4/strict.dtd">
 
 <script type="text/javascript">
-var s = "";
-for (i = 0 ; i < 200000 ; i++) {
-   s += "a {}\n";
-}
+var array = Array(200000);
+for (var i = 0; i < 200000; ++i)
+    array[i] = "a {}\n";
+var s = array.join("");
+
 var style = document.createElement("style");
 style.appendChild(document.createTextNode(s));
 document.getElementsByTagName("head")[0].appendChild(style);
@@ -17,8 +18,8 @@ if (window.layoutTestController)
 
 <!-- loading a linked style sheet causes the list of CSS Rules to be rebuilt,
      which caused a crash (stack overflow) -->
-<link rel="stylesheet" href="results/large-list-of-rules-crash.css"> 
-<link rel="stylesheet" href="results/large-list-of-rules-crash.css">
+<link rel="stylesheet" href="resources/large-list-of-rules-crash.css">
+<link rel="stylesheet" href="resources/large-list-of-rules-crash.css">
 
 <p>Test case for
 <a href="https://bugs.webkit.org/show_bug.cgi?id=27748"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list