Changeset 143287 in webkit
- Timestamp:
- Feb 18, 2013 6:55:26 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143284 r143287 1 2013-02-18 Anders Carlsson <andersca@apple.com> 2 3 Add a DefaultHash for RefPtr<SecurityOrigin> 4 https://bugs.webkit.org/show_bug.cgi?id=110170 5 6 Reviewed by Andreas Kling. 7 8 Remove all explicit uses of SecurityOriginHash. 9 10 * Modules/webdatabase/DatabaseTracker.h: 11 * Modules/webdatabase/OriginQuotaManager.h: 12 * loader/appcache/ApplicationCacheStorage.cpp: 13 (WebCore::ApplicationCacheStorage::getOriginsWithCache): 14 * loader/cache/MemoryCache.h: 15 * page/SecurityOriginHash.h: 16 * storage/StorageNamespaceImpl.h: 17 (StorageNamespaceImpl): 18 1 19 2013-02-18 David Hyatt <hyatt@apple.com> 2 20 -
trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.h
r142030 r143287 41 41 #include "DatabaseDetails.h" 42 42 #include "SQLiteDatabase.h" 43 #include "SecurityOriginHash.h" 43 44 #include <wtf/OwnPtr.h> 44 45 #endif // !PLATFORM(CHROMIUM) … … 50 51 class SecurityOrigin; 51 52 52 struct SecurityOriginHash;53 54 53 #if !PLATFORM(CHROMIUM) 55 54 class DatabaseManagerClient; 56 55 57 struct SecurityOriginTraits;58 56 #endif // !PLATFORM(CHROMIUM) 59 57 … … 146 144 typedef HashSet<DatabaseBackend*> DatabaseSet; 147 145 typedef HashMap<String, DatabaseSet*> DatabaseNameMap; 148 typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap* , SecurityOriginHash> DatabaseOriginMap;146 typedef HashMap<RefPtr<SecurityOrigin>, DatabaseNameMap*> DatabaseOriginMap; 149 147 150 148 Mutex m_openDatabaseMapGuard; … … 155 153 SQLiteDatabase m_database; 156 154 157 typedef HashMap<RefPtr<SecurityOrigin>, unsigned long long , SecurityOriginHash> QuotaMap;155 typedef HashMap<RefPtr<SecurityOrigin>, unsigned long long> QuotaMap; 158 156 mutable OwnPtr<QuotaMap> m_quotaMap; 159 157 … … 166 164 CreateSet m_beingCreated; 167 165 typedef HashSet<String> NameSet; 168 HashMap<RefPtr<SecurityOrigin>, NameSet* , SecurityOriginHash> m_beingDeleted;169 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash> m_originsBeingDeleted;166 HashMap<RefPtr<SecurityOrigin>, NameSet*> m_beingDeleted; 167 HashSet<RefPtr<SecurityOrigin> > m_originsBeingDeleted; 170 168 bool isDeletingDatabaseOrOriginFor(SecurityOrigin*, const String& name); 171 169 void recordCreatingDatabase(SecurityOrigin*, const String& name); -
trunk/Source/WebCore/Modules/webdatabase/OriginQuotaManager.h
r141207 r143287 41 41 class DatabaseBackend; 42 42 class OriginUsageRecord; 43 class SecurityOrigin; 43 44 44 45 class OriginQuotaManager { … … 66 67 #endif 67 68 68 typedef HashMap<RefPtr<SecurityOrigin>, OriginUsageRecord* , SecurityOriginHash> OriginUsageMap;69 typedef HashMap<RefPtr<SecurityOrigin>, OriginUsageRecord*> OriginUsageMap; 69 70 OriginUsageMap m_usageMap; 70 71 }; -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
r130612 r143287 1513 1513 } 1514 1514 1515 void ApplicationCacheStorage::getOriginsWithCache(HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>& origins)1515 void ApplicationCacheStorage::getOriginsWithCache(HashSet<RefPtr<SecurityOrigin> >& origins) 1516 1516 { 1517 1517 Vector<KURL> urls; -
trunk/Source/WebCore/loader/cache/MemoryCache.h
r128418 r143287 27 27 28 28 #include "CachedResource.h" 29 #include "SecurityOriginHash.h" 29 30 #include <wtf/HashMap.h> 30 31 #include <wtf/HashSet.h> … … 159 160 void resourceAccessed(CachedResource*); 160 161 161 typedef HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash> SecurityOriginSet;162 typedef HashSet<RefPtr<SecurityOrigin> > SecurityOriginSet; 162 163 void removeResourcesWithOrigin(SecurityOrigin*); 163 164 void getOriginsWithCache(SecurityOriginSet& origins); -
trunk/Source/WebCore/page/SecurityOriginHash.h
r95901 r143287 79 79 } // namespace WebCore 80 80 81 #endif 81 namespace WTF { 82 template<typename> struct DefaultHash; 83 84 template<> struct DefaultHash<RefPtr<WebCore::SecurityOrigin> > { 85 typedef WebCore::SecurityOriginHash Hash; 86 }; 87 88 } // namespace WTF 89 90 #endif // SecurityOriginHash_h -
trunk/Source/WebCore/storage/StorageNamespaceImpl.h
r136323 r143287 60 60 StorageNamespaceImpl(StorageType, const String& path, unsigned quota); 61 61 62 typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageAreaImpl> , SecurityOriginHash> StorageAreaMap;62 typedef HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageAreaImpl> > StorageAreaMap; 63 63 StorageAreaMap m_storageAreaMap; 64 64 -
trunk/Source/WebKit/mac/ChangeLog
r143096 r143287 1 2013-02-18 Anders Carlsson <andersca@apple.com> 2 3 Add a DefaultHash for RefPtr<SecurityOrigin> 4 https://bugs.webkit.org/show_bug.cgi?id=110170 5 6 Reviewed by Andreas Kling. 7 8 Remove all explicit uses of SecurityOriginHash. 9 10 * WebCoreSupport/WebApplicationCache.mm: 11 (+[WebApplicationCache originsWithCache]): 12 1 13 2013-02-15 Eric Carlson <eric.carlson@apple.com> 2 14 -
trunk/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm
r95919 r143287 74 74 + (NSArray *)originsWithCache 75 75 { 76 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash> coreOrigins;76 HashSet<RefPtr<SecurityOrigin> > coreOrigins; 77 77 cacheStorage().getOriginsWithCache(coreOrigins); 78 78 79 79 NSMutableArray *webOrigins = [[[NSMutableArray alloc] initWithCapacity:coreOrigins.size()] autorelease]; 80 80 81 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>::const_iterator end = coreOrigins.end();82 for (HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>::const_iterator it = coreOrigins.begin(); it != end; ++it) {81 HashSet<RefPtr<SecurityOrigin> >::const_iterator end = coreOrigins.end(); 82 for (HashSet<RefPtr<SecurityOrigin> >::const_iterator it = coreOrigins.begin(); it != end; ++it) { 83 83 RetainPtr<WebSecurityOrigin> webOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:(*it).get()]); 84 84 [webOrigins addObject:webOrigin.get()]; -
trunk/Source/WebKit2/ChangeLog
r143277 r143287 1 2013-02-18 Anders Carlsson <andersca@apple.com> 2 3 Add a DefaultHash for RefPtr<SecurityOrigin> 4 https://bugs.webkit.org/show_bug.cgi?id=110170 5 6 Reviewed by Andreas Kling. 7 8 Remove all explicit uses of SecurityOriginHash. 9 10 * UIProcess/Storage/StorageManager.cpp: 11 (StorageManager::SessionStorageNamespace): 12 * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: 13 (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): 14 * WebProcess/InjectedBundle/InjectedBundle.cpp: 15 (WebKit::InjectedBundle::originsWithApplicationCache): 16 * WebProcess/Notifications/NotificationPermissionRequestManager.h: 17 Include SecurityOriginHash.h. This fixes a bug where m_originToIDMap used pointer-equality 18 for looking up security origins. 19 20 * WebProcess/ResourceCache/WebResourceCacheManager.cpp: 21 (WebKit::WebResourceCacheManager::clearCacheForOrigin): 22 This can just take a const reference. 23 24 * WebProcess/ResourceCache/WebResourceCacheManager.h: 25 1 26 2013-02-18 Anders Carlsson <andersca@apple.com> 2 27 -
trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp
r143277 r143287 70 70 SessionStorageNamespace(); 71 71 72 HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea> , SecurityOriginHash> m_storageAreaMap;72 HashMap<RefPtr<SecurityOrigin>, RefPtr<StorageArea> > m_storageAreaMap; 73 73 }; 74 74 -
trunk/Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp
r141711 r143287 54 54 void WebApplicationCacheManager::getApplicationCacheOrigins(uint64_t callbackID) 55 55 { 56 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash> origins;56 HashSet<RefPtr<SecurityOrigin> > origins; 57 57 58 58 cacheStorage().getOriginsWithCache(origins); … … 61 61 identifiers.reserveCapacity(origins.size()); 62 62 63 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>::iterator end = origins.end();64 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>::iterator i = origins.begin();63 HashSet<RefPtr<SecurityOrigin> >::iterator end = origins.end(); 64 HashSet<RefPtr<SecurityOrigin> >::iterator i = origins.begin(); 65 65 for (; i != end; ++i) { 66 66 RefPtr<SecurityOrigin> origin = *i; -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r142509 r143287 399 399 PassRefPtr<ImmutableArray> InjectedBundle::originsWithApplicationCache() 400 400 { 401 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash> origins;401 HashSet<RefPtr<SecurityOrigin> > origins; 402 402 cacheStorage().getOriginsWithCache(origins); 403 403 Vector< RefPtr<APIObject> > originsVector; 404 404 405 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>::iterator it = origins.begin();406 HashSet<RefPtr<SecurityOrigin> , SecurityOriginHash>::iterator end = origins.end();405 HashSet<RefPtr<SecurityOrigin> >::iterator it = origins.begin(); 406 HashSet<RefPtr<SecurityOrigin> >::iterator end = origins.end(); 407 407 for ( ; it != end; ++it) 408 408 originsVector.append(WebString::create((*it)->databaseIdentifier())); -
trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.h
r127299 r143287 29 29 #include <WebCore/NotificationClient.h> 30 30 #include <WebCore/NotificationPermissionCallback.h> 31 #include <WebCore/SecurityOriginHash.h> 31 32 #include <WebCore/VoidCallback.h> 32 33 #include <wtf/HashMap.h> -
trunk/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp
r141658 r143287 87 87 } 88 88 89 void WebResourceCacheManager::clearCacheForOrigin( SecurityOriginDataoriginData, uint32_t cachesToClear) const89 void WebResourceCacheManager::clearCacheForOrigin(const SecurityOriginData& originData, uint32_t cachesToClear) const 90 90 { 91 91 #if USE(CFURLCACHE) -
trunk/Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h
r141658 r143287 52 52 53 53 void getCacheOrigins(uint64_t callbackID) const; 54 void clearCacheForOrigin( SecurityOriginData, uint32_t cachesToClear) const;54 void clearCacheForOrigin(const SecurityOriginData&, uint32_t cachesToClear) const; 55 55 void clearCacheForAllOrigins(uint32_t cachesToClear) const; 56 56
Note: See TracChangeset
for help on using the changeset viewer.