Commit 7818fadd authored by Chris Palmer's avatar Chris Palmer

[Partition Alloc] Remove dead comments.

An old form of a double-free check was present in comments. The new form is in
live code. Also remove a TODO we likely won't be able to do.

Bug: None
Change-Id: Ibbd18b6c98ae7729f46cf8f314e34b0634458d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733803Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684173}
parent d8324cdb
...@@ -217,10 +217,6 @@ ALWAYS_INLINE void PartitionPage::Free(void* ptr) { ...@@ -217,10 +217,6 @@ ALWAYS_INLINE void PartitionPage::Free(void* ptr) {
#endif #endif
DCHECK(this->num_allocated_slots); DCHECK(this->num_allocated_slots);
// TODO(palmer): See if we can afford to make this a CHECK.
// FIX FIX FIX
// DCHECK(!freelist_head || PartitionRootBase::IsValidPage(
// PartitionPage::FromPointer(freelist_head)));
CHECK(ptr != freelist_head); // Catches an immediate double free. CHECK(ptr != freelist_head); // Catches an immediate double free.
// Look for double free one level deeper in debug. // Look for double free one level deeper in debug.
DCHECK(!freelist_head || ptr != internal::PartitionFreelistEntry::Transform( DCHECK(!freelist_head || ptr != internal::PartitionFreelistEntry::Transform(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment