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

Side by Side Diff: third_party/WebKit/Source/wtf/Deque.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class DequeIterator; 44 class DequeIterator;
45 template <typename T, size_t inlineCapacity, typename Allocator> 45 template <typename T, size_t inlineCapacity, typename Allocator>
46 class DequeConstIterator; 46 class DequeConstIterator;
47 47
48 template <typename T, 48 template <typename T,
49 size_t inlineCapacity = 0, 49 size_t inlineCapacity = 0,
50 typename Allocator = PartitionAllocator> 50 typename Allocator = PartitionAllocator>
51 class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>, 51 class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>,
52 (INLINE_CAPACITY == 0) && 52 (INLINE_CAPACITY == 0) &&
53 Allocator::isGarbageCollected> { 53 Allocator::isGarbageCollected> {
54 WTF_USE_ALLOCATOR(Deque, Allocator); 54 USE_ALLOCATOR(Deque, Allocator);
55 55
56 public: 56 public:
57 typedef DequeIterator<T, inlineCapacity, Allocator> iterator; 57 typedef DequeIterator<T, inlineCapacity, Allocator> iterator;
58 typedef DequeConstIterator<T, inlineCapacity, Allocator> const_iterator; 58 typedef DequeConstIterator<T, inlineCapacity, Allocator> const_iterator;
59 typedef std::reverse_iterator<iterator> reverse_iterator; 59 typedef std::reverse_iterator<iterator> reverse_iterator;
60 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; 60 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
61 61
62 Deque(); 62 Deque();
63 Deque(const Deque&); 63 Deque(const Deque&);
64 Deque& operator=(const Deque&); 64 Deque& operator=(const Deque&);
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 inline void swap(Deque<T, inlineCapacity, Allocator>& a, 666 inline void swap(Deque<T, inlineCapacity, Allocator>& a,
667 Deque<T, inlineCapacity, Allocator>& b) { 667 Deque<T, inlineCapacity, Allocator>& b) {
668 a.swap(b); 668 a.swap(b);
669 } 669 }
670 670
671 } // namespace WTF 671 } // namespace WTF
672 672
673 using WTF::Deque; 673 using WTF::Deque;
674 674
675 #endif // WTF_Deque_h 675 #endif // WTF_Deque_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698