Add a DefaultHash for RefPtr<SecurityOrigin>
Created attachment 188972 [details] Patch
Comment on attachment 188972 [details] Patch Fabulous! r=me. Might wanna let EWS chew on it.
Attachment 188972 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/Modules/webdatabase/DatabaseTracker.h', u'Source/WebCore/Modules/webdatabase/OriginQuotaManager.h', u'Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp', u'Source/WebCore/loader/cache/MemoryCache.h', u'Source/WebCore/page/SecurityOriginHash.h', u'Source/WebCore/storage/StorageNamespaceImpl.h', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/UIProcess/Storage/StorageManager.cpp', u'Source/WebKit2/WebProcess/ApplicationCache/WebApplicationCacheManager.cpp', u'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp', u'Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.h', u'Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp', u'Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h']" exit_code: 1 Source/WebCore/page/SecurityOriginHash.h:82: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 188972 [details] Patch Clearing flags on attachment: 188972 Committed r143287: <http://trac.webkit.org/changeset/143287>
All reviewed patches have been landed. Closing bug.
Seems a little strange for a RefPtr to hash by what’s pointed to rather than the pointer by default. Should we do this for other classes like RefPtr<StringImpl> too?
Does compilation fail if you forget to include "SecurityOriginHash.h"?
(In reply to comment #6) > Seems a little strange for a RefPtr to hash by what’s pointed to rather than the pointer by default. Should we do this for other classes like RefPtr<StringImpl> too? This is already the case. From StringImpl.h: // StringHash is the default hash for StringImpl* and RefPtr<StringImpl> template<typename T> struct DefaultHash; template<> struct DefaultHash<StringImpl*> { typedef StringHash Hash; }; template<> struct DefaultHash<RefPtr<StringImpl> > { typedef StringHash Hash; };