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

Side by Side Diff: Source/wtf/HashTraits.h

Issue 211073002: [Oilpan]: Move CSSFontSelectorClient to the oilpan heap using transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding StyleEngine.cpp change (forgot to upload diff again with WTF change) Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 }; 184 };
185 185
186 template<typename T> struct HashTraits<RawPtr<T> > : SimpleClassHashTraits<R awPtr<T> > { 186 template<typename T> struct HashTraits<RawPtr<T> > : SimpleClassHashTraits<R awPtr<T> > {
187 typedef std::nullptr_t EmptyValueType; 187 typedef std::nullptr_t EmptyValueType;
188 static EmptyValueType emptyValue() { return nullptr; } 188 static EmptyValueType emptyValue() { return nullptr; }
189 189
190 static const bool hasIsEmptyValueFunction = true; 190 static const bool hasIsEmptyValueFunction = true;
191 static bool isEmptyValue(const RawPtr<T>& value) { return !value; } 191 static bool isEmptyValue(const RawPtr<T>& value) { return !value; }
192 192
193 static const bool needsDestruction = false; 193 static const bool needsDestruction = false;
194 typedef T* PeekInType; 194 typedef RawPtr<T> PeekInType;
195 typedef T* PassInType; 195 typedef RawPtr<T> PassInType;
196 typedef RawPtr<T>* IteratorGetType; 196 typedef RawPtr<T>* IteratorGetType;
197 typedef const RawPtr<T>* IteratorConstGetType; 197 typedef const RawPtr<T>* IteratorConstGetType;
198 typedef RawPtr<T>& IteratorReferenceType; 198 typedef RawPtr<T>& IteratorReferenceType;
199 typedef T* const IteratorConstReferenceType; 199 typedef T* const IteratorConstReferenceType;
200 static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return *x; } 200 static IteratorReferenceType getToReferenceConversion(IteratorGetType x) { return *x; }
201 static IteratorConstReferenceType getToReferenceConstConversion(Iterator ConstGetType x) { return x->get(); } 201 static IteratorConstReferenceType getToReferenceConstConversion(Iterator ConstGetType x) { return x->get(); }
202 typedef T* PeekOutType; 202 typedef RawPtr<T> PeekOutType;
203 typedef T* PassOutType; 203 typedef RawPtr<T> PassOutType;
204 204
205 template<typename U> 205 template<typename U>
206 static void store(const U& value, RawPtr<T>& storage) { storage = value; } 206 static void store(const U& value, RawPtr<T>& storage) { storage = value; }
207 207
208 static PeekOutType peek(const RawPtr<T>& value) { return value; } 208 static PeekOutType peek(const RawPtr<T>& value) { return value; }
209 static PeekOutType peek(std::nullptr_t) { return 0; } 209 static PeekOutType peek(std::nullptr_t) { return 0; }
210 210
211 static PassOutType passOut(const RawPtr<T>& value) { return value; } 211 static PassOutType passOut(const RawPtr<T>& value) { return value; }
212 static PassOutType passOut(std::nullptr_t) { return 0; } 212 static PassOutType passOut(std::nullptr_t) { return 0; }
213 }; 213 };
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 }; 310 };
311 311
312 } // namespace WTF 312 } // namespace WTF
313 313
314 using WTF::HashTraits; 314 using WTF::HashTraits;
315 using WTF::PairHashTraits; 315 using WTF::PairHashTraits;
316 using WTF::NullableHashTraits; 316 using WTF::NullableHashTraits;
317 using WTF::SimpleClassHashTraits; 317 using WTF::SimpleClassHashTraits;
318 318
319 #endif // WTF_HashTraits_h 319 #endif // WTF_HashTraits_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698