[zone][cleanup] Remove uses of DISALLOW_COPY_AND_ASSIGN
Replace by explicitly deleting the copy constructor and copy assignment operator. R=zhin@chromium.org Bug: v8:11074 Change-Id: If312e920b1ef42f8ef667f3b81066ff2aad054e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523316 Reviewed-by: Zhi An Ng <zhin@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#71104}
This commit is contained in:
parent
a7ba1705cf
commit
c1d85f5359
@ -26,6 +26,8 @@ class Zone;
|
||||
class V8_EXPORT_PRIVATE AccountingAllocator {
|
||||
public:
|
||||
AccountingAllocator();
|
||||
AccountingAllocator(const AccountingAllocator&) = delete;
|
||||
AccountingAllocator& operator=(const AccountingAllocator&) = delete;
|
||||
virtual ~AccountingAllocator();
|
||||
|
||||
// Allocates a new segment. Returns nullptr on failed allocation.
|
||||
@ -69,8 +71,6 @@ class V8_EXPORT_PRIVATE AccountingAllocator {
|
||||
|
||||
std::unique_ptr<VirtualMemory> reserved_area_;
|
||||
std::unique_ptr<base::BoundedPageAllocator> bounded_page_allocator_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AccountingAllocator);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
@ -60,6 +60,9 @@ class ZoneChunkList : public ZoneObject {
|
||||
}
|
||||
}
|
||||
|
||||
ZoneChunkList(const ZoneChunkList&) = delete;
|
||||
ZoneChunkList& operator=(const ZoneChunkList&) = delete;
|
||||
|
||||
size_t size() const { return size_; }
|
||||
bool is_empty() const { return size() == 0; }
|
||||
|
||||
@ -139,8 +142,6 @@ class ZoneChunkList : public ZoneObject {
|
||||
size_t size_ = 0;
|
||||
Chunk* front_ = nullptr;
|
||||
Chunk* back_ = nullptr;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ZoneChunkList);
|
||||
};
|
||||
|
||||
template <typename T, bool backwards, bool modifiable>
|
||||
|
@ -48,6 +48,9 @@ class ZoneList final : public ZoneObject {
|
||||
|
||||
ZoneList(ZoneList<T>&& other) V8_NOEXCEPT { *this = std::move(other); }
|
||||
|
||||
ZoneList(const ZoneList&) = delete;
|
||||
ZoneList& operator=(const ZoneList&) = delete;
|
||||
|
||||
// The ZoneList objects are usually allocated as a fields in other
|
||||
// zone-allocated objects for which destructors are not called anyway, so
|
||||
// we are not going to clear the memory here as well.
|
||||
@ -177,8 +180,6 @@ class ZoneList final : public ZoneObject {
|
||||
|
||||
// Resize the list.
|
||||
void Resize(int new_capacity, Zone* zone);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ZoneList);
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
Loading…
Reference in New Issue
Block a user