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

Side by Side Diff: third_party/WebKit/Source/wtf/HashMap.h

Issue 2518253002: Move Partition Allocator into Chromium base. (Closed)
Patch Set: Move OOM_CRASH into its own, more specific header. Fixes Windows build. Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
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 29 matching lines...) Expand all
40 // Note: empty or deleted key values are not allowed, using them may lead to 40 // Note: empty or deleted key values are not allowed, using them may lead to
41 // undefined behavior. For pointer keys this means that null pointers are not 41 // undefined behavior. For pointer keys this means that null pointers are not
42 // allowed unless you supply custom key traits. 42 // allowed unless you supply custom key traits.
43 template <typename KeyArg, 43 template <typename KeyArg,
44 typename MappedArg, 44 typename MappedArg,
45 typename HashArg = typename DefaultHash<KeyArg>::Hash, 45 typename HashArg = typename DefaultHash<KeyArg>::Hash,
46 typename KeyTraitsArg = HashTraits<KeyArg>, 46 typename KeyTraitsArg = HashTraits<KeyArg>,
47 typename MappedTraitsArg = HashTraits<MappedArg>, 47 typename MappedTraitsArg = HashTraits<MappedArg>,
48 typename Allocator = PartitionAllocator> 48 typename Allocator = PartitionAllocator>
49 class HashMap { 49 class HashMap {
50 WTF_USE_ALLOCATOR(HashMap, Allocator); 50 USE_ALLOCATOR(HashMap, Allocator);
51 51
52 private: 52 private:
53 typedef KeyTraitsArg KeyTraits; 53 typedef KeyTraitsArg KeyTraits;
54 typedef MappedTraitsArg MappedTraits; 54 typedef MappedTraitsArg MappedTraits;
55 typedef HashMapValueTraits<KeyTraits, MappedTraits> ValueTraits; 55 typedef HashMapValueTraits<KeyTraits, MappedTraits> ValueTraits;
56 56
57 public: 57 public:
58 typedef typename KeyTraits::TraitType KeyType; 58 typedef typename KeyTraits::TraitType KeyType;
59 typedef const typename KeyTraits::PeekInType& KeyPeekInType; 59 typedef const typename KeyTraits::PeekInType& KeyPeekInType;
60 typedef typename MappedTraits::TraitType MappedType; 60 typedef typename MappedTraits::TraitType MappedType;
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 iterator end = collection.end().values(); 700 iterator end = collection.end().values();
701 for (unsigned i = 0; it != end; ++it, ++i) 701 for (unsigned i = 0; it != end; ++it, ++i)
702 vector[i] = *it; 702 vector[i] = *it;
703 } 703 }
704 704
705 } // namespace WTF 705 } // namespace WTF
706 706
707 using WTF::HashMap; 707 using WTF::HashMap;
708 708
709 #endif // WTF_HashMap_h 709 #endif // WTF_HashMap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698