Fix by Darin, reviewed by Maciej.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Feb 2007 08:23:31 +0000 (08:23 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Feb 2007 08:23:31 +0000 (08:23 +0000)
        - fix ~10% performance regression from encoding fix

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset): Fix a logic
        error which made huge strings accidentally.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19335 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/TextResourceDecoder.cpp

index 037e4647d9590a94435fa25b12b7fba26b4d97d5..d1cbd055f63053cdd3a07c0c5b72754f58cc2042 100644 (file)
@@ -1,3 +1,13 @@
+2007-02-01  Maciej Stachowiak  <mjs@apple.com>
+
+        Fix by Darin, reviewed by Maciej.
+
+        - fix ~10% performance regression from encoding fix
+
+        * loader/TextResourceDecoder.cpp:
+        (WebCore::TextResourceDecoder::checkForHeadCharset): Fix a logic
+        error which made huge strings accidentally.
+
 2007-02-01  Lars Knoll <lars@trolltech.com>
 
         Fix the Qt build
index 44d57fbe9a77ed10b0d9f31d4cdb3ab384120670..9f65240b28b8f355d55a8e814a1fcdefd231daa3 100644 (file)
@@ -578,7 +578,7 @@ bool TextResourceDecoder::checkForHeadCharset(const char* data, size_t len, bool
             }
             
             if (!end && tag == metaTag) {
-                DeprecatedCString str(tagContentStart, tagContentStart - ptr);
+                DeprecatedCString str(tagContentStart, ptr - tagContentStart);
                 str = str.lower();
                 int pos = 0;
                 while (pos < (int)str.length()) {