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

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

Issue 319593004: Oilpan:Allow custom handling of classes that contain weak pointers that are embedded in collections. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove 'typename' that Win compiler does not like Created 6 years, 6 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
« no previous file with comments | « Source/wtf/TypeTraits.h ('k') | Source/wtf/VectorTraits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 { 298 {
299 return Allocator::Quantizer::template quantizedSize<T>(capacity); 299 return Allocator::Quantizer::template quantizedSize<T>(capacity);
300 } 300 }
301 301
302 T* buffer() { return m_buffer; } 302 T* buffer() { return m_buffer; }
303 const T* buffer() const { return m_buffer; } 303 const T* buffer() const { return m_buffer; }
304 size_t capacity() const { return m_capacity; } 304 size_t capacity() const { return m_capacity; }
305 305
306 void clearUnusedSlots(T* from, T* to) 306 void clearUnusedSlots(T* from, T* to)
307 { 307 {
308 VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTrai ts<T>::needsDestruction || ShouldBeTraced<VectorTraits<T> >::value || VectorTrai ts<T>::isWeak), T>::clear(from, to); 308 VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTrai ts<T>::needsDestruction || ShouldBeTraced<VectorTraits<T> >::value), T>::clear(f rom, to);
309 } 309 }
310 310
311 protected: 311 protected:
312 VectorBufferBase() 312 VectorBufferBase()
313 : m_buffer(0) 313 : m_buffer(0)
314 , m_capacity(0) 314 , m_capacity(0)
315 { 315 {
316 } 316 }
317 317
318 VectorBufferBase(T* buffer, size_t capacity) 318 VectorBufferBase(T* buffer, size_t capacity)
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 } 1194 }
1195 if (this->hasOutOfLineBuffer()) 1195 if (this->hasOutOfLineBuffer())
1196 Allocator::markNoTracing(visitor, buffer()); 1196 Allocator::markNoTracing(visitor, buffer());
1197 } 1197 }
1198 1198
1199 } // namespace WTF 1199 } // namespace WTF
1200 1200
1201 using WTF::Vector; 1201 using WTF::Vector;
1202 1202
1203 #endif // WTF_Vector_h 1203 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « Source/wtf/TypeTraits.h ('k') | Source/wtf/VectorTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698