Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(879)

Unified Diff: Source/wtf/HashTraits.h

Issue 14763003: HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/mediastream/MediaStreamRegistry.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/HashTraits.h
diff --git a/Source/wtf/HashTraits.h b/Source/wtf/HashTraits.h
index 69df8b781a1447b8f1951c7f955e5c0490768d9d..329c18b394f2792d3a51c1ec934784df8dbbf4ff 100644
--- a/Source/wtf/HashTraits.h
+++ b/Source/wtf/HashTraits.h
@@ -149,8 +149,9 @@ namespace WTF {
typedef PassRefPtr<P> PassOutType;
static PassRefPtr<P> passOut(RefPtr<P>& value) { return value.release(); }
- // FIXME: We should consider changing PeekType to a raw pointer for better performance,
- // but then callers won't need to call get; doing so will require updating many call sites.
+
+ typedef P* PeekType;
+ static PeekType peek(const RefPtr<P>& value) { return value.get(); }
};
template<> struct HashTraits<String> : SimpleClassHashTraits<String> {
« no previous file with comments | « Source/modules/mediastream/MediaStreamRegistry.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698