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

abarth at webkit.org abarth at webkit.org
Sun Feb 20 22:53:41 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 191f397dd399acc5c96ea6c24c802ff6971ba18d
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 13 01:39:26 2011 +0000

    2011-01-12  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Darin Adler.
    
            Remove premature optimization from SchemeRegistry
            https://bugs.webkit.org/show_bug.cgi?id=52283
    
            As far as I can tell, this optimization isn't necessary.  I'm slightly
            unsure which benchmarks to run to demonstrate this numerically, but
            none of the benchmarks Chromium tracks were affected by adding a
            similar check for "display-isolated" schemes.
    
            * platform/SchemeRegistry.cpp:
            (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75664 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 2c1a962..02a689c 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2011-01-12  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Remove premature optimization from SchemeRegistry
+        https://bugs.webkit.org/show_bug.cgi?id=52283
+
+        As far as I can tell, this optimization isn't necessary.  I'm slightly
+        unsure which benchmarks to run to demonstrate this numerically, but
+        none of the benchmarks Chromium tracks were affected by adding a
+        similar check for "display-isolated" schemes.
+
+        * platform/SchemeRegistry.cpp:
+        (WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
+
 2011-01-12  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/Source/WebCore/platform/SchemeRegistry.cpp b/Source/WebCore/platform/SchemeRegistry.cpp
index f4891d5..71697cb 100644
--- a/Source/WebCore/platform/SchemeRegistry.cpp
+++ b/Source/WebCore/platform/SchemeRegistry.cpp
@@ -109,19 +109,8 @@ const URLSchemesMap& SchemeRegistry::localSchemes()
 
 bool SchemeRegistry::shouldTreatURLSchemeAsLocal(const String& scheme)
 {
-    // This avoids an allocation of another String and the HashSet contains()
-    // call for the file: and http: schemes.
-    if (scheme.length() == 4) {
-        const UChar* s = scheme.characters();
-        if (s[0] == 'h' && s[1] == 't' && s[2] == 't' && s[3] == 'p')
-            return false;
-        if (s[0] == 'f' && s[1] == 'i' && s[2] == 'l' && s[3] == 'e')
-            return true;
-    }
-
     if (scheme.isEmpty())
         return false;
-
     return localURLSchemes().contains(scheme);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list