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

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

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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 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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 spot->~T(); 1524 spot->~T();
1525 TypeOperations::moveOverlapping(spot + 1, end(), spot); 1525 TypeOperations::moveOverlapping(spot + 1, end(), spot);
1526 clearUnusedSlots(end() - 1, end()); 1526 clearUnusedSlots(end() - 1, end());
1527 ANNOTATE_CHANGE_SIZE(begin(), capacity(), m_size, m_size - 1); 1527 ANNOTATE_CHANGE_SIZE(begin(), capacity(), m_size, m_size - 1);
1528 --m_size; 1528 --m_size;
1529 } 1529 }
1530 1530
1531 template <typename T, size_t inlineCapacity, typename Allocator> 1531 template <typename T, size_t inlineCapacity, typename Allocator>
1532 inline void Vector<T, inlineCapacity, Allocator>::remove(size_t position, 1532 inline void Vector<T, inlineCapacity, Allocator>::remove(size_t position,
1533 size_t length) { 1533 size_t length) {
1534 ASSERT_WITH_SECURITY_IMPLICATION(position <= size()); 1534 SECURITY_DCHECK(position <= size());
1535 if (!length) 1535 if (!length)
1536 return; 1536 return;
1537 RELEASE_ASSERT(position + length <= size()); 1537 RELEASE_ASSERT(position + length <= size());
1538 T* beginSpot = begin() + position; 1538 T* beginSpot = begin() + position;
1539 T* endSpot = beginSpot + length; 1539 T* endSpot = beginSpot + length;
1540 TypeOperations::destruct(beginSpot, endSpot); 1540 TypeOperations::destruct(beginSpot, endSpot);
1541 TypeOperations::moveOverlapping(endSpot, end(), beginSpot); 1541 TypeOperations::moveOverlapping(endSpot, end(), beginSpot);
1542 clearUnusedSlots(end() - length, end()); 1542 clearUnusedSlots(end() - length, end());
1543 ANNOTATE_CHANGE_SIZE(begin(), capacity(), m_size, m_size - length); 1543 ANNOTATE_CHANGE_SIZE(begin(), capacity(), m_size, m_size - length);
1544 m_size -= length; 1544 m_size -= length;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 visitor, *const_cast<T*>(bufferEntry)); 1604 visitor, *const_cast<T*>(bufferEntry));
1605 checkUnusedSlots(buffer() + size(), buffer() + capacity()); 1605 checkUnusedSlots(buffer() + size(), buffer() + capacity());
1606 } 1606 }
1607 } 1607 }
1608 1608
1609 } // namespace WTF 1609 } // namespace WTF
1610 1610
1611 using WTF::Vector; 1611 using WTF::Vector;
1612 1612
1613 #endif // WTF_Vector_h 1613 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h ('k') | third_party/WebKit/Source/wtf/allocator/PartitionAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698