Commit c1d85f53 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[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/+/2523316Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71104}
parent a7ba1705
...@@ -26,6 +26,8 @@ class Zone; ...@@ -26,6 +26,8 @@ class Zone;
class V8_EXPORT_PRIVATE AccountingAllocator { class V8_EXPORT_PRIVATE AccountingAllocator {
public: public:
AccountingAllocator(); AccountingAllocator();
AccountingAllocator(const AccountingAllocator&) = delete;
AccountingAllocator& operator=(const AccountingAllocator&) = delete;
virtual ~AccountingAllocator(); virtual ~AccountingAllocator();
// Allocates a new segment. Returns nullptr on failed allocation. // Allocates a new segment. Returns nullptr on failed allocation.
...@@ -69,8 +71,6 @@ class V8_EXPORT_PRIVATE AccountingAllocator { ...@@ -69,8 +71,6 @@ class V8_EXPORT_PRIVATE AccountingAllocator {
std::unique_ptr<VirtualMemory> reserved_area_; std::unique_ptr<VirtualMemory> reserved_area_;
std::unique_ptr<base::BoundedPageAllocator> bounded_page_allocator_; std::unique_ptr<base::BoundedPageAllocator> bounded_page_allocator_;
DISALLOW_COPY_AND_ASSIGN(AccountingAllocator);
}; };
} // namespace internal } // namespace internal
......
...@@ -60,6 +60,9 @@ class ZoneChunkList : public ZoneObject { ...@@ -60,6 +60,9 @@ class ZoneChunkList : public ZoneObject {
} }
} }
ZoneChunkList(const ZoneChunkList&) = delete;
ZoneChunkList& operator=(const ZoneChunkList&) = delete;
size_t size() const { return size_; } size_t size() const { return size_; }
bool is_empty() const { return size() == 0; } bool is_empty() const { return size() == 0; }
...@@ -139,8 +142,6 @@ class ZoneChunkList : public ZoneObject { ...@@ -139,8 +142,6 @@ class ZoneChunkList : public ZoneObject {
size_t size_ = 0; size_t size_ = 0;
Chunk* front_ = nullptr; Chunk* front_ = nullptr;
Chunk* back_ = nullptr; Chunk* back_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(ZoneChunkList);
}; };
template <typename T, bool backwards, bool modifiable> template <typename T, bool backwards, bool modifiable>
......
...@@ -48,6 +48,9 @@ class ZoneList final : public ZoneObject { ...@@ -48,6 +48,9 @@ class ZoneList final : public ZoneObject {
ZoneList(ZoneList<T>&& other) V8_NOEXCEPT { *this = std::move(other); } 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 // The ZoneList objects are usually allocated as a fields in other
// zone-allocated objects for which destructors are not called anyway, so // zone-allocated objects for which destructors are not called anyway, so
// we are not going to clear the memory here as well. // we are not going to clear the memory here as well.
...@@ -177,8 +180,6 @@ class ZoneList final : public ZoneObject { ...@@ -177,8 +180,6 @@ class ZoneList final : public ZoneObject {
// Resize the list. // Resize the list.
void Resize(int new_capacity, Zone* zone); void Resize(int new_capacity, Zone* zone);
DISALLOW_COPY_AND_ASSIGN(ZoneList);
}; };
} // namespace internal } // namespace internal
......
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