[cleanup][init] Remove uses of DISALLOW_COPY_AND_ASSIGN

Bug: v8:11074
Change-Id: I80b7c54e44f2fc0cdc4d9786b58aaa92de519b04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2567536
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71517}
This commit is contained in:
Zhi An Ng 2020-12-01 07:31:00 +00:00 committed by Commit Bot
parent 61741d6295
commit 277f4dc272
3 changed files with 11 additions and 8 deletions

View File

@ -247,13 +247,14 @@ class Genesis {
class ExtensionStates {
public:
ExtensionStates();
ExtensionStates(const ExtensionStates&) = delete;
ExtensionStates& operator=(const ExtensionStates&) = delete;
ExtensionTraversalState get_state(RegisteredExtension* extension);
void set_state(RegisteredExtension* extension,
ExtensionTraversalState state);
private:
base::HashMap map_;
DISALLOW_COPY_AND_ASSIGN(ExtensionStates);
};
// Used both for deserialized and from-scratch contexts to add the extensions

View File

@ -19,6 +19,8 @@ namespace internal {
class SourceCodeCache final {
public:
explicit SourceCodeCache(Script::Type type) : type_(type) {}
SourceCodeCache(const SourceCodeCache&) = delete;
SourceCodeCache& operator=(const SourceCodeCache&) = delete;
void Initialize(Isolate* isolate, bool create_heap_objects);
@ -33,13 +35,15 @@ class SourceCodeCache final {
private:
Script::Type type_;
FixedArray cache_;
DISALLOW_COPY_AND_ASSIGN(SourceCodeCache);
};
// The Boostrapper is the public interface for creating a JavaScript global
// context.
class Bootstrapper final {
public:
Bootstrapper(const Bootstrapper&) = delete;
Bootstrapper& operator=(const Bootstrapper&) = delete;
static void InitializeOncePerProcess();
// Requires: Heap::SetUp has been called.
@ -108,8 +112,6 @@ class Bootstrapper final {
friend class NativesExternalStringResource;
explicit Bootstrapper(Isolate* isolate);
DISALLOW_COPY_AND_ASSIGN(Bootstrapper);
};
class BootstrapperActive final {
@ -118,13 +120,13 @@ class BootstrapperActive final {
: bootstrapper_(bootstrapper) {
++bootstrapper_->nesting_;
}
BootstrapperActive(const BootstrapperActive&) = delete;
BootstrapperActive& operator=(const BootstrapperActive&) = delete;
~BootstrapperActive() { --bootstrapper_->nesting_; }
private:
Bootstrapper* bootstrapper_;
DISALLOW_COPY_AND_ASSIGN(BootstrapperActive);
};
} // namespace internal

View File

@ -37,6 +37,8 @@ class V8_EXPORT_PRIVATE IsolateAllocator final {
public:
IsolateAllocator();
~IsolateAllocator();
IsolateAllocator(const IsolateAllocator&) = delete;
IsolateAllocator& operator=(const IsolateAllocator&) = delete;
void* isolate_memory() const { return isolate_memory_; }
@ -51,8 +53,6 @@ class V8_EXPORT_PRIVATE IsolateAllocator final {
v8::PageAllocator* page_allocator_ = nullptr;
std::unique_ptr<base::BoundedPageAllocator> page_allocator_instance_;
VirtualMemory reservation_;
DISALLOW_COPY_AND_ASSIGN(IsolateAllocator);
};
} // namespace internal