[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

oliver at apple.com oliver at apple.com
Sun Feb 20 23:51:09 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit f60aec771d8e216a92e23e9bfbb44851902d96d9
Author: oliver at apple.com <oliver at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 25 21:13:55 2011 +0000

    2011-01-25  Oliver Hunt  <oliver at apple.com>
    
            Reviewed by Gavin Barraclough.
    
            JSON.stringify processing time exponentially grows with size of object
            https://bugs.webkit.org/show_bug.cgi?id=51922
    
            Remove last use of reserveCapacity from JSON stringification, as it results
            in appalling append behaviour when there are a large number of property names
            and nothing else.
    
            * runtime/JSONObject.cpp:
            (JSC::Stringifier::appendQuotedString):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76635 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 7fb4045..a0cfb8f 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-25  Oliver Hunt  <oliver at apple.com>
+
+        Reviewed by Gavin Barraclough.
+
+        JSON.stringify processing time exponentially grows with size of object
+        https://bugs.webkit.org/show_bug.cgi?id=51922
+
+        Remove last use of reserveCapacity from JSON stringification, as it results
+        in appalling append behaviour when there are a large number of property names
+        and nothing else.
+
+        * runtime/JSONObject.cpp:
+        (JSC::Stringifier::appendQuotedString):
+
 2011-01-25  Antti Koivisto  <antti at apple.com>
 
         Not reviewed.
diff --git a/Source/JavaScriptCore/runtime/JSONObject.cpp b/Source/JavaScriptCore/runtime/JSONObject.cpp
index df4be52..5a8250f 100644
--- a/Source/JavaScriptCore/runtime/JSONObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSONObject.cpp
@@ -284,9 +284,6 @@ void Stringifier::appendQuotedString(UStringBuilder& builder, const UString& val
 {
     int length = value.length();
 
-    // String length plus 2 for quote marks plus 8 so we can accomodate a few escaped characters.
-    builder.reserveCapacity(builder.length() + length + 2 + 8);
-
     builder.append('"');
 
     const UChar* data = value.characters();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list