[WK2] Use light supplement names instead of static AtomicStrings
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2013 00:10:09 +0000 (00:10 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2013 00:10:09 +0000 (00:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108570

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-02-01
Reviewed by Anders Carlsson.

Since all the supplement names are just string literals and are all different,
we can just use their pointer as the key in the supplement hashmaps.

This is lighter and faster than using AtomicString. WebCore already moved to this
in Supplementable.

* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::addSupplement):
(NetworkProcess):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::supplementName):
* Shared/Authentication/AuthenticationManager.h:
(AuthenticationManager):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
(CustomProtocolManager):
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::supplementName):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::supplementName):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::supplementName):
* UIProcess/WebApplicationCacheManagerProxy.h:
(WebApplicationCacheManagerProxy):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::supplementName):
* UIProcess/WebCookieManagerProxy.h:
(WebCookieManagerProxy):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::supplementName):
* UIProcess/WebDatabaseManagerProxy.h:
(WebDatabaseManagerProxy):
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::supplementName):
* UIProcess/WebGeolocationManagerProxy.h:
(WebGeolocationManagerProxy):
* UIProcess/WebKeyValueStorageManagerProxy.cpp:
(WebKit::WebKeyValueStorageManagerProxy::supplementName):
* UIProcess/WebKeyValueStorageManagerProxy.h:
(WebKeyValueStorageManagerProxy):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::supplementName):
* UIProcess/WebMediaCacheManagerProxy.h:
(WebMediaCacheManagerProxy):
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::supplementName):
* UIProcess/WebResourceCacheManagerProxy.h:
(WebResourceCacheManagerProxy):
* UIProcess/soup/WebSoupRequestManagerProxy.cpp:
(WebKit::WebSoupRequestManagerProxy::supplementName):
* UIProcess/soup/WebSoupRequestManagerProxy.h:
(WebSoupRequestManagerProxy):
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
(WebKit::WebApplicationCacheManager::supplementName):
* WebProcess/ApplicationCache/WebApplicationCacheManager.h:
(WebApplicationCacheManager):
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::supplementName):
* WebProcess/Cookies/WebCookieManager.h:
(WebCookieManager):
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::supplementName):
* WebProcess/Geolocation/WebGeolocationManager.h:
(WebGeolocationManager):
* WebProcess/MediaCache/WebMediaCacheManager.cpp:
(WebKit::WebMediaCacheManager::supplementName):
* WebProcess/MediaCache/WebMediaCacheManager.h:
(WebMediaCacheManager):
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::supplementName):
* WebProcess/Notifications/WebNotificationManager.h:
(WebNotificationManager):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::supplementName):
* WebProcess/ResourceCache/WebResourceCacheManager.h:
(WebResourceCacheManager):
* WebProcess/Storage/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::supplementName):
* WebProcess/Storage/WebKeyValueStorageManager.h:
(WebKeyValueStorageManager):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::supplementName):
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
(WebDatabaseManager):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::addSupplement):
(WebProcess):

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

42 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp
Source/WebKit2/Shared/Authentication/AuthenticationManager.h
Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm
Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h
Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp
Source/WebKit2/UIProcess/WebCookieManagerProxy.h
Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp
Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp
Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h
Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp
Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.h
Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp
Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.h
Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp
Source/WebKit2/WebProcess/Cookies/WebCookieManager.h
Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp
Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.h
Source/WebKit2/WebProcess/MediaCache/WebMediaCacheManager.cpp
Source/WebKit2/WebProcess/MediaCache/WebMediaCacheManager.h
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp
Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h
Source/WebKit2/WebProcess/Storage/WebKeyValueStorageManager.cpp
Source/WebKit2/WebProcess/Storage/WebKeyValueStorageManager.h
Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h
Source/WebKit2/WebProcess/WebProcess.h

index 95707e8..f746250 100644 (file)
@@ -1,5 +1,103 @@
 2013-02-01  Benjamin Poulain  <bpoulain@apple.com>
 
+        [WK2] Use light supplement names instead of static AtomicStrings
+        https://bugs.webkit.org/show_bug.cgi?id=108570
+
+        Reviewed by Anders Carlsson.
+
+        Since all the supplement names are just string literals and are all different,
+        we can just use their pointer as the key in the supplement hashmaps.
+
+        This is lighter and faster than using AtomicString. WebCore already moved to this
+        in Supplementable.
+
+        * NetworkProcess/NetworkProcess.h:
+        (WebKit::NetworkProcess::addSupplement):
+        (NetworkProcess):
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::supplementName):
+        * Shared/Authentication/AuthenticationManager.h:
+        (AuthenticationManager):
+        * Shared/Network/CustomProtocols/CustomProtocolManager.h:
+        (CustomProtocolManager):
+        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
+        (WebKit::CustomProtocolManager::supplementName):
+        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
+        (WebKit::WebNotificationManagerProxy::supplementName):
+        * UIProcess/Notifications/WebNotificationManagerProxy.h:
+        (WebNotificationManagerProxy):
+        * UIProcess/WebApplicationCacheManagerProxy.cpp:
+        (WebKit::WebApplicationCacheManagerProxy::supplementName):
+        * UIProcess/WebApplicationCacheManagerProxy.h:
+        (WebApplicationCacheManagerProxy):
+        * UIProcess/WebContext.h:
+        (WebContext):
+        * UIProcess/WebCookieManagerProxy.cpp:
+        (WebKit::WebCookieManagerProxy::supplementName):
+        * UIProcess/WebCookieManagerProxy.h:
+        (WebCookieManagerProxy):
+        * UIProcess/WebDatabaseManagerProxy.cpp:
+        (WebKit::WebDatabaseManagerProxy::supplementName):
+        * UIProcess/WebDatabaseManagerProxy.h:
+        (WebDatabaseManagerProxy):
+        * UIProcess/WebGeolocationManagerProxy.cpp:
+        (WebKit::WebGeolocationManagerProxy::supplementName):
+        * UIProcess/WebGeolocationManagerProxy.h:
+        (WebGeolocationManagerProxy):
+        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
+        (WebKit::WebKeyValueStorageManagerProxy::supplementName):
+        * UIProcess/WebKeyValueStorageManagerProxy.h:
+        (WebKeyValueStorageManagerProxy):
+        * UIProcess/WebMediaCacheManagerProxy.cpp:
+        (WebKit::WebMediaCacheManagerProxy::supplementName):
+        * UIProcess/WebMediaCacheManagerProxy.h:
+        (WebMediaCacheManagerProxy):
+        * UIProcess/WebResourceCacheManagerProxy.cpp:
+        (WebKit::WebResourceCacheManagerProxy::supplementName):
+        * UIProcess/WebResourceCacheManagerProxy.h:
+        (WebResourceCacheManagerProxy):
+        * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
+        (WebKit::WebSoupRequestManagerProxy::supplementName):
+        * UIProcess/soup/WebSoupRequestManagerProxy.h:
+        (WebSoupRequestManagerProxy):
+        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
+        (WebKit::WebApplicationCacheManager::supplementName):
+        * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
+        (WebApplicationCacheManager):
+        * WebProcess/Cookies/WebCookieManager.cpp:
+        (WebKit::WebCookieManager::supplementName):
+        * WebProcess/Cookies/WebCookieManager.h:
+        (WebCookieManager):
+        * WebProcess/Geolocation/WebGeolocationManager.cpp:
+        (WebKit::WebGeolocationManager::supplementName):
+        * WebProcess/Geolocation/WebGeolocationManager.h:
+        (WebGeolocationManager):
+        * WebProcess/MediaCache/WebMediaCacheManager.cpp:
+        (WebKit::WebMediaCacheManager::supplementName):
+        * WebProcess/MediaCache/WebMediaCacheManager.h:
+        (WebMediaCacheManager):
+        * WebProcess/Notifications/WebNotificationManager.cpp:
+        (WebKit::WebNotificationManager::supplementName):
+        * WebProcess/Notifications/WebNotificationManager.h:
+        (WebNotificationManager):
+        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
+        (WebKit::WebResourceCacheManager::supplementName):
+        * WebProcess/ResourceCache/WebResourceCacheManager.h:
+        (WebResourceCacheManager):
+        * WebProcess/Storage/WebKeyValueStorageManager.cpp:
+        (WebKit::WebKeyValueStorageManager::supplementName):
+        * WebProcess/Storage/WebKeyValueStorageManager.h:
+        (WebKeyValueStorageManager):
+        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
+        (WebKit::WebDatabaseManager::supplementName):
+        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
+        (WebDatabaseManager):
+        * WebProcess/WebProcess.h:
+        (WebKit::WebProcess::addSupplement):
+        (WebProcess):
+
+2013-02-01  Benjamin Poulain  <bpoulain@apple.com>
+
         Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
         https://bugs.webkit.org/show_bug.cgi?id=108558
 
index 1c1ed98..1be55f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -61,7 +61,7 @@ public:
     template <typename T>
     void addSupplement()
     {
-        m_supplements.add(T::supplementName(), new T(this));
+        m_supplements.add(T::supplementName(), adoptPtr<NetworkProcessSupplement>(new T(this)));
     }
 
     void removeNetworkConnectionToWebProcess(NetworkConnectionToWebProcess*);
@@ -119,7 +119,7 @@ private:
     bool m_hasSetCacheModel;
     CacheModel m_cacheModel;
 
-    typedef HashMap<AtomicString, NetworkProcessSupplement*> NetworkProcessSupplementMap;
+    typedef HashMap<const char*, OwnPtr<NetworkProcessSupplement>, PtrHash<const char*> > NetworkProcessSupplementMap;
     NetworkProcessSupplementMap m_supplements;
 };
 
index 4f4fb83..ab69b74 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -52,10 +52,9 @@ static uint64_t generateAuthenticationChallengeID()
     return atomicIncrement(&uniqueAuthenticationChallengeID);
 }
 
-const AtomicString& AuthenticationManager::supplementName()
+const char* AuthenticationManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("AuthenticationManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "AuthenticationManager";
 }
 
 AuthenticationManager::AuthenticationManager(ChildProcess* process)
index b57b48f..eb59f48 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -50,7 +50,7 @@ class AuthenticationManager : public WebProcessSupplement, public NetworkProcess
 public:
     explicit AuthenticationManager(ChildProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     // Called for resources in the WebProcess (NetworkProcess disabled)
     void didReceiveAuthenticationChallenge(WebFrame*, const WebCore::AuthenticationChallenge&);
index cd6b8ff..3d9f167 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -60,7 +60,7 @@ class CustomProtocolManager : public WebProcessSupplement, public NetworkProcess
 public:
     explicit CustomProtocolManager(ChildProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     ChildProcess* childProcess() const { return m_childProcess; }
 
index ce93465..494cb6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -109,10 +109,9 @@ static uint64_t generateCustomProtocolID()
 
 namespace WebKit {
 
-const AtomicString& CustomProtocolManager::supplementName()
+const const char* CustomProtocolManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("CustomProtocolManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "CustomProtocolManager";
 }
 
 CustomProtocolManager::CustomProtocolManager(ChildProcess* childProcess)
index 42e45cd..174637b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,10 +40,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebNotificationManagerProxy::supplementName()
+const char* WebNotificationManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebNotificationManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebNotificationManagerProxy";
 }
 
 PassRefPtr<WebNotificationManagerProxy> WebNotificationManagerProxy::create(WebContext* context)
index 8861538..26f10fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -47,7 +47,7 @@ class WebNotificationManagerProxy : public APIObject, public WebContextSupplemen
 public:
     static const Type APIType = TypeNotificationManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebNotificationManagerProxy> create(WebContext*);
 
index 687c4c0..7e2782c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebKit {
 
-const AtomicString& WebApplicationCacheManagerProxy::supplementName()
+const char* WebApplicationCacheManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebApplicationCacheManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebApplicationCacheManagerProxy";
 }
 
 PassRefPtr<WebApplicationCacheManagerProxy> WebApplicationCacheManagerProxy::create(WebContext* context)
index 331ffb7..6134e34 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -50,7 +50,7 @@ class WebApplicationCacheManagerProxy : public APIObject, public WebContextSuppl
 public:
     static const Type APIType = TypeApplicationCacheManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebApplicationCacheManagerProxy> create(WebContext*);
     virtual ~WebApplicationCacheManagerProxy();
index bc6b3b7..756efaa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -424,7 +424,7 @@ private:
 
     RefPtr<StorageManager> m_storageManager;
 
-    typedef HashMap<AtomicString, RefPtr<WebContextSupplement> > WebContextSupplementMap;
+    typedef HashMap<const char*, RefPtr<WebContextSupplement>, PtrHash<const char*> > WebContextSupplementMap;
     WebContextSupplementMap m_supplements;
 
 #if USE(SOUP)
index 1492b6f..21fd6eb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebKit {
 
-const AtomicString& WebCookieManagerProxy::supplementName()
+const char* WebCookieManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebCookieManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebCookieManagerProxy";
 }
 
 PassRefPtr<WebCookieManagerProxy> WebCookieManagerProxy::create(WebContext* context)
index 5c6c8f9..6d122c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -56,7 +56,7 @@ class WebCookieManagerProxy : public APIObject, public WebContextSupplement, pri
 public:
     static const Type APIType = TypeCookieManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebCookieManagerProxy> create(WebContext*);
     virtual ~WebCookieManagerProxy();
index 26e5c64..665cc03 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,10 +39,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebDatabaseManagerProxy::supplementName()
+const char* WebDatabaseManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebDatabaseManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebDatabaseManagerProxy";
 }
 
 String WebDatabaseManagerProxy::originKey()
index 08f96c9..4e21231 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -50,7 +50,7 @@ class WebDatabaseManagerProxy : public APIObject, public WebContextSupplement, p
 public:
     static const Type APIType = TypeDatabaseManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebDatabaseManagerProxy> create(WebContext*);
     virtual ~WebDatabaseManagerProxy();
index 8566381..5f54080 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebKit {
 
-const AtomicString& WebGeolocationManagerProxy::supplementName()
+const char* WebGeolocationManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebGeolocationManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebGeolocationManagerProxy";
 }
 
 PassRefPtr<WebGeolocationManagerProxy> WebGeolocationManagerProxy::create(WebContext* context)
index 14d876c..c0a80b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@ class WebGeolocationManagerProxy : public APIObject, public WebContextSupplement
 public:
     static const Type APIType = TypeGeolocationManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebGeolocationManagerProxy> create(WebContext*);
     virtual ~WebGeolocationManagerProxy();
index e2550ab..906ff3a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebKit {
 
-const AtomicString& WebKeyValueStorageManagerProxy::supplementName()
+const char* WebKeyValueStorageManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebKeyValueStorageManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebKeyValueStorageManagerProxy";
 }
 
 PassRefPtr<WebKeyValueStorageManagerProxy> WebKeyValueStorageManagerProxy::create(WebContext* context)
index d8d9668..5e3c3af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@ class WebKeyValueStorageManagerProxy : public APIObject, public WebContextSupple
 public:
     static const Type APIType = TypeKeyValueStorageManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebKeyValueStorageManagerProxy> create(WebContext*);
     virtual ~WebKeyValueStorageManagerProxy();
index 553d6a2..425dc91 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebKit {
 
-const AtomicString& WebMediaCacheManagerProxy::supplementName()
+const char* WebMediaCacheManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebMediaCacheManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebMediaCacheManagerProxy";
 }
 
 PassRefPtr<WebMediaCacheManagerProxy> WebMediaCacheManagerProxy::create(WebContext* context)
index 477eac3..6a0e9b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -46,7 +46,7 @@ class WebMediaCacheManagerProxy : public APIObject, public WebContextSupplement,
 public:
     static const Type APIType = TypeMediaCacheManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebMediaCacheManagerProxy> create(WebContext*);
     virtual ~WebMediaCacheManagerProxy();
index 8080420..8c08a47 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,10 +38,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebResourceCacheManagerProxy::supplementName()
+const char* WebResourceCacheManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebResourceCacheManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebResourceCacheManagerProxy";
 }
 
 PassRefPtr<WebResourceCacheManagerProxy> WebResourceCacheManagerProxy::create(WebContext* webContext)
index f8944de..b31fde2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -48,7 +48,7 @@ class WebResourceCacheManagerProxy : public APIObject, public WebContextSuppleme
 public:
     static const Type APIType = TypeCacheManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebResourceCacheManagerProxy> create(WebContext*);
     virtual ~WebResourceCacheManagerProxy();
index 694b48b..7f2fd31 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Igalia S.L.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 
 namespace WebKit {
 
-const AtomicString& WebSoupRequestManagerProxy::supplementName()
+const char* WebSoupRequestManagerProxy::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebSoupRequestManagerProxy", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebSoupRequestManagerProxy";
 }
 
 PassRefPtr<WebSoupRequestManagerProxy> WebSoupRequestManagerProxy::create(WebContext* context)
index c21b0b7..5f4d178 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Igalia S.L.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -37,7 +38,7 @@ class WebSoupRequestManagerProxy : public APIObject, public WebContextSupplement
 public:
     static const Type APIType = TypeSoupRequestManager;
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     static PassRefPtr<WebSoupRequestManagerProxy> create(WebContext*);
     virtual ~WebSoupRequestManagerProxy();
index 6a0379d..88acf5b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,10 +40,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebApplicationCacheManager::supplementName()
+const char* WebApplicationCacheManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebApplicationCacheManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebApplicationCacheManager";
 }
 
 WebApplicationCacheManager::WebApplicationCacheManager(ChildProcess* childProcess)
index bfdb131..ecb94e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@ class WebApplicationCacheManager : public WebProcessSupplement, public CoreIPC::
 public:
     WebApplicationCacheManager(ChildProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     void deleteAllEntries();
     void setAppCacheMaximumSize(uint64_t);
index b2cdc04..81d2064 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,10 +43,9 @@ namespace WebKit {
 
 static WebCookieManager* sharedCookieManager;
 
-const AtomicString& WebCookieManager::supplementName()
+const char* WebCookieManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebCookieManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebCookieManager";
 }
 
 WebCookieManager::WebCookieManager(ChildProcess* process)
index aee5fe5..ca6b1a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -47,7 +47,7 @@ class WebCookieManager : public WebProcessSupplement, public NetworkProcessSuppl
 public:
     WebCookieManager(ChildProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     void setHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy);
 #if USE(SOUP)
index c641b3e..6bd415a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,10 +40,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebGeolocationManager::supplementName()
+const char* WebGeolocationManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebGeolocationManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebGeolocationManager";
 }
 
 WebGeolocationManager::WebGeolocationManager(WebProcess* process)
index d853375..4a1d73a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,7 +49,7 @@ public:
     explicit WebGeolocationManager(WebProcess*);
     ~WebGeolocationManager();
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     void registerWebPage(WebPage*);
     void unregisterWebPage(WebPage*);
index 258b59f..d8aa22b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -35,10 +35,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebMediaCacheManager::supplementName()
+const char* WebMediaCacheManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebMediaCacheManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebMediaCacheManager";
 }
 
 WebMediaCacheManager::WebMediaCacheManager(WebProcess* process)
index fe7ed8d..a147162 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -41,7 +41,7 @@ class WebMediaCacheManager : public WebProcessSupplement, public CoreIPC::Messag
 public:
     explicit WebMediaCacheManager(WebProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
 private:
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
index b8ab77e..2540238 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -56,10 +56,9 @@ static uint64_t generateNotificationID()
 }
 #endif
 
-const AtomicString& WebNotificationManager::supplementName()
+const char* WebNotificationManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebNotificationManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebNotificationManager";
 }
 
 WebNotificationManager::WebNotificationManager(WebProcess* process)
index f2d91b8..bc9eb8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -51,7 +51,7 @@ public:
     explicit WebNotificationManager(WebProcess*);
     ~WebNotificationManager();
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
     
     bool show(WebCore::Notification*, WebPage*);
     void cancel(WebCore::Notification*, WebPage*);
index acca14f..63e87ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,10 +40,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebResourceCacheManager::supplementName()
+const char* WebResourceCacheManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebResourceCacheManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebResourceCacheManager";
 }
 
 WebResourceCacheManager::WebResourceCacheManager(WebProcess* process)
index 494cd40..39cacfd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ class WebResourceCacheManager : public WebProcessSupplement, public CoreIPC::Mes
 public:
     WebResourceCacheManager(WebProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
 private:
     // CoreIPC::MessageReceiver
index 125accc..3b499c5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,10 +39,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebKeyValueStorageManager::supplementName()
+const char* WebKeyValueStorageManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebKeyValueStorageManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebKeyValueStorageManager";
 }
 
 WebKeyValueStorageManager::WebKeyValueStorageManager(WebProcess* process)
index 98dcf53..823805b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ class WebKeyValueStorageManager : public WebCore::StorageTrackerClient, public W
 public:
     explicit WebKeyValueStorageManager(WebProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     const String& localStorageDirectory() const { return m_localStorageDirectory; }
 #if ENABLE(INDEXED_DATABASE)
index 6d17a05..901225e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,10 +42,9 @@ using namespace WebCore;
 
 namespace WebKit {
 
-const AtomicString& WebDatabaseManager::supplementName()
+const char* WebDatabaseManager::supplementName()
 {
-    DEFINE_STATIC_LOCAL(AtomicString, name, ("WebDatabaseManager", AtomicString::ConstructFromLiteral));
-    return name;
+    return "WebDatabaseManager";
 }
 
 WebDatabaseManager::WebDatabaseManager(WebProcess* process)
index 3c53d16..a5f620f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +43,7 @@ class WebDatabaseManager : public WebCore::DatabaseManagerClient, public WebProc
 public:
     explicit WebDatabaseManager(WebProcess*);
 
-    static const AtomicString& supplementName();
+    static const char* supplementName();
 
     void setQuotaForOrigin(const String& originIdentifier, unsigned long long quota) const;
     void deleteAllDatabases() const;
index 80bc7e8..1f2e745 100644 (file)
@@ -109,7 +109,7 @@ public:
     template <typename T>
     void addSupplement()
     {
-        m_supplements.add(T::supplementName(), new T(this));
+        m_supplements.add(T::supplementName(), adoptPtr<WebProcessSupplement>(new T(this)));
     }
 
     WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); }
@@ -318,7 +318,7 @@ private:
 
     HashMap<uint64_t, WebFrame*> m_frameMap;
 
-    typedef HashMap<AtomicString, WebProcessSupplement*> WebProcessSupplementMap;
+    typedef HashMap<const char*, OwnPtr<WebProcessSupplement>, PtrHash<const char*> > WebProcessSupplementMap;
     WebProcessSupplementMap m_supplements;
 
     TextCheckerState m_textCheckerState;