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

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

Issue 1166623002: Oilpan: Remove a visitor parameter from isHeapObjectAlive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/HashTable.h ('k') | public/web/WebFrame.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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 { 1314 {
1315 ASSERT(Allocator::isGarbageCollected); // Garbage collector must be enab led. 1315 ASSERT(Allocator::isGarbageCollected); // Garbage collector must be enab led.
1316 if (!buffer()) 1316 if (!buffer())
1317 return; 1317 return;
1318 if (this->hasOutOfLineBuffer()) { 1318 if (this->hasOutOfLineBuffer()) {
1319 // This is a performance optimization for a case where the buffer 1319 // This is a performance optimization for a case where the buffer
1320 // has been already traced by somewhere. This can happen if 1320 // has been already traced by somewhere. This can happen if
1321 // the conservative scanning traced an on-stack (false-positive 1321 // the conservative scanning traced an on-stack (false-positive
1322 // or real) pointer to the HeapVector, and then visitor->trace() 1322 // or real) pointer to the HeapVector, and then visitor->trace()
1323 // traces the HeapVector. 1323 // traces the HeapVector.
1324 if (visitor->isHeapObjectAlive(buffer())) 1324 if (Allocator::isHeapObjectAlive(buffer()))
1325 return; 1325 return;
1326 Allocator::markNoTracing(visitor, buffer()); 1326 Allocator::markNoTracing(visitor, buffer());
1327 } 1327 }
1328 const T* bufferBegin = buffer(); 1328 const T* bufferBegin = buffer();
1329 const T* bufferEnd = buffer() + size(); 1329 const T* bufferEnd = buffer() + size();
1330 if (ShouldBeTraced<VectorTraits<T>>::value) { 1330 if (ShouldBeTraced<VectorTraits<T>>::value) {
1331 for (const T* bufferEntry = bufferBegin; bufferEntry != bufferEnd; b ufferEntry++) 1331 for (const T* bufferEntry = bufferBegin; bufferEntry != bufferEnd; b ufferEntry++)
1332 Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>> (visitor, *const_cast<T*>(bufferEntry)); 1332 Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>> (visitor, *const_cast<T*>(bufferEntry));
1333 checkUnusedSlots(buffer() + size(), buffer() + capacity()); 1333 checkUnusedSlots(buffer() + size(), buffer() + capacity());
1334 } 1334 }
1335 } 1335 }
1336 1336
1337 #if !ENABLE(OILPAN) 1337 #if !ENABLE(OILPAN)
1338 template<typename T, size_t N> 1338 template<typename T, size_t N>
1339 struct NeedsTracing<Vector<T, N>> { 1339 struct NeedsTracing<Vector<T, N>> {
1340 static const bool value = false; 1340 static const bool value = false;
1341 }; 1341 };
1342 #endif 1342 #endif
1343 1343
1344 } // namespace WTF 1344 } // namespace WTF
1345 1345
1346 using WTF::Vector; 1346 using WTF::Vector;
1347 1347
1348 #endif // WTF_Vector_h 1348 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « Source/wtf/HashTable.h ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698