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

Side by Side Diff: Source/heap/Heap.h

Issue 180003002: Consistently use on-heap collections for StyleRuleBase descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 1297
1298 template<typename T, size_t inlineCapacity = 0> 1298 template<typename T, size_t inlineCapacity = 0>
1299 class HeapVector : public Vector<T, inlineCapacity, HeapAllocator> { 1299 class HeapVector : public Vector<T, inlineCapacity, HeapAllocator> {
1300 public: 1300 public:
1301 HeapVector() { } 1301 HeapVector() { }
1302 1302
1303 explicit HeapVector(size_t size) : Vector<T, inlineCapacity, HeapAllocator>( size) 1303 explicit HeapVector(size_t size) : Vector<T, inlineCapacity, HeapAllocator>( size)
1304 { 1304 {
1305 } 1305 }
1306 1306
1307 HeapVector(size_t size, const T& val) : Vector<T, inlineCapacity, HeapAlloca tor>(size, val)
haraken 2014/02/26 02:20:13 We might want to add a test for this.
Vyacheslav Egorov (Chromium) 2014/02/26 13:12:24 Done.
1308 {
1309 }
1310
1307 template<size_t otherCapacity> 1311 template<size_t otherCapacity>
1308 HeapVector(const HeapVector<T, otherCapacity>& other) 1312 HeapVector(const HeapVector<T, otherCapacity>& other)
1309 : Vector<T, inlineCapacity, HeapAllocator>(other) 1313 : Vector<T, inlineCapacity, HeapAllocator>(other)
1310 { 1314 {
1311 } 1315 }
1312 1316
1313 template<typename U> 1317 template<typename U>
1314 void append(const U& other) 1318 void append(const U& other)
1315 { 1319 {
1316 Vector<T, inlineCapacity, HeapAllocator>::append(other); 1320 Vector<T, inlineCapacity, HeapAllocator>::append(other);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 // to export. This forces it to export all the methods from ThreadHeap. 1675 // to export. This forces it to export all the methods from ThreadHeap.
1672 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf o*); 1676 template<> void ThreadHeap<FinalizedHeapObjectHeader>::addPageToHeap(const GCInf o*);
1673 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*); 1677 template<> void ThreadHeap<HeapObjectHeader>::addPageToHeap(const GCInfo*);
1674 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>; 1678 extern template class HEAP_EXPORT ThreadHeap<FinalizedHeapObjectHeader>;
1675 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>; 1679 extern template class HEAP_EXPORT ThreadHeap<HeapObjectHeader>;
1676 #endif 1680 #endif
1677 1681
1678 } 1682 }
1679 1683
1680 #endif // Heap_h 1684 #endif // Heap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698