Commit f120fc1d authored by Zhi An Ng's avatar Zhi An Ng Committed by Commit Bot

[cleanup] Remove remaining uses of DISALLOW_COPY_AND_ASSIGN

Bug: v8:11074
Change-Id: I108a847e12df2438cc73e4f7a31ba4148f07cdc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2569562
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71593}
parent dec7565f
...@@ -59,6 +59,8 @@ template <PerIsolateAssertType kType, bool kAllow> ...@@ -59,6 +59,8 @@ template <PerIsolateAssertType kType, bool kAllow>
class V8_NODISCARD PerIsolateAssertScope { class V8_NODISCARD PerIsolateAssertScope {
public: public:
V8_EXPORT_PRIVATE explicit PerIsolateAssertScope(Isolate* isolate); V8_EXPORT_PRIVATE explicit PerIsolateAssertScope(Isolate* isolate);
PerIsolateAssertScope(const PerIsolateAssertScope&) = delete;
PerIsolateAssertScope& operator=(const PerIsolateAssertScope&) = delete;
V8_EXPORT_PRIVATE ~PerIsolateAssertScope(); V8_EXPORT_PRIVATE ~PerIsolateAssertScope();
static bool IsAllowed(Isolate* isolate); static bool IsAllowed(Isolate* isolate);
...@@ -66,8 +68,6 @@ class V8_NODISCARD PerIsolateAssertScope { ...@@ -66,8 +68,6 @@ class V8_NODISCARD PerIsolateAssertScope {
private: private:
Isolate* isolate_; Isolate* isolate_;
uint32_t old_data_; uint32_t old_data_;
DISALLOW_COPY_AND_ASSIGN(PerIsolateAssertScope);
}; };
template <typename... Scopes> template <typename... Scopes>
......
...@@ -101,6 +101,8 @@ class AsyncGC final : public CancelableTask { ...@@ -101,6 +101,8 @@ class AsyncGC final : public CancelableTask {
ctx_(isolate, isolate->GetCurrentContext()), ctx_(isolate, isolate->GetCurrentContext()),
resolver_(isolate, resolver), resolver_(isolate, resolver),
type_(type) {} type_(type) {}
AsyncGC(const AsyncGC&) = delete;
AsyncGC& operator=(const AsyncGC&) = delete;
void RunInternal() final { void RunInternal() final {
v8::HandleScope scope(isolate_); v8::HandleScope scope(isolate_);
...@@ -116,8 +118,6 @@ class AsyncGC final : public CancelableTask { ...@@ -116,8 +118,6 @@ class AsyncGC final : public CancelableTask {
v8::Persistent<v8::Context> ctx_; v8::Persistent<v8::Context> ctx_;
v8::Persistent<v8::Promise::Resolver> resolver_; v8::Persistent<v8::Promise::Resolver> resolver_;
v8::Isolate::GarbageCollectionType type_; v8::Isolate::GarbageCollectionType type_;
DISALLOW_COPY_AND_ASSIGN(AsyncGC);
}; };
} // namespace } // namespace
......
...@@ -102,6 +102,8 @@ class V8_EXPORT_PRIVATE StubCache { ...@@ -102,6 +102,8 @@ class V8_EXPORT_PRIVATE StubCache {
// The constructor is made public only for the purposes of testing. // The constructor is made public only for the purposes of testing.
explicit StubCache(Isolate* isolate); explicit StubCache(Isolate* isolate);
StubCache(const StubCache&) = delete;
StubCache& operator=(const StubCache&) = delete;
private: private:
// The stub cache has a primary and secondary level. The two levels have // The stub cache has a primary and secondary level. The two levels have
...@@ -142,8 +144,6 @@ class V8_EXPORT_PRIVATE StubCache { ...@@ -142,8 +144,6 @@ class V8_EXPORT_PRIVATE StubCache {
friend class Isolate; friend class Isolate;
friend class SCTableReference; friend class SCTableReference;
DISALLOW_COPY_AND_ASSIGN(StubCache);
}; };
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
...@@ -21,6 +21,8 @@ class V8_EXPORT_PRIVATE ControlFlowBuilder { ...@@ -21,6 +21,8 @@ class V8_EXPORT_PRIVATE ControlFlowBuilder {
public: public:
explicit ControlFlowBuilder(BytecodeArrayBuilder* builder) explicit ControlFlowBuilder(BytecodeArrayBuilder* builder)
: builder_(builder) {} : builder_(builder) {}
ControlFlowBuilder(const ControlFlowBuilder&) = delete;
ControlFlowBuilder& operator=(const ControlFlowBuilder&) = delete;
virtual ~ControlFlowBuilder() = default; virtual ~ControlFlowBuilder() = default;
protected: protected:
...@@ -28,8 +30,6 @@ class V8_EXPORT_PRIVATE ControlFlowBuilder { ...@@ -28,8 +30,6 @@ class V8_EXPORT_PRIVATE ControlFlowBuilder {
private: private:
BytecodeArrayBuilder* builder_; BytecodeArrayBuilder* builder_;
DISALLOW_COPY_AND_ASSIGN(ControlFlowBuilder);
}; };
class V8_EXPORT_PRIVATE BreakableControlFlowBuilder class V8_EXPORT_PRIVATE BreakableControlFlowBuilder
......
...@@ -123,6 +123,9 @@ class V8_EXPORT_PRIVATE SamplerManager { ...@@ -123,6 +123,9 @@ class V8_EXPORT_PRIVATE SamplerManager {
public: public:
using SamplerList = std::vector<Sampler*>; using SamplerList = std::vector<Sampler*>;
SamplerManager(const SamplerManager&) = delete;
SamplerManager& operator=(const SamplerManager&) = delete;
// Add |sampler| to the map if it is not already present. // Add |sampler| to the map if it is not already present.
void AddSampler(Sampler* sampler); void AddSampler(Sampler* sampler);
...@@ -146,8 +149,6 @@ class V8_EXPORT_PRIVATE SamplerManager { ...@@ -146,8 +149,6 @@ class V8_EXPORT_PRIVATE SamplerManager {
std::unordered_map<pthread_t, SamplerList> sampler_map_; std::unordered_map<pthread_t, SamplerList> sampler_map_;
AtomicMutex samplers_access_counter_{false}; AtomicMutex samplers_access_counter_{false};
DISALLOW_COPY_AND_ASSIGN(SamplerManager);
}; };
#endif // USE_SIGNALS #endif // USE_SIGNALS
......
...@@ -413,6 +413,8 @@ class ReadStringVisitor : public TqObjectVisitor { ...@@ -413,6 +413,8 @@ class ReadStringVisitor : public TqObjectVisitor {
that_->index_ += index_adjust_; that_->index_ += index_adjust_;
that_->limit_ += limit_adjust_; that_->limit_ += limit_adjust_;
} }
IndexModifier(const IndexModifier&) = delete;
IndexModifier& operator=(const IndexModifier&) = delete;
~IndexModifier() { ~IndexModifier() {
that_->index_ -= index_adjust_; that_->index_ -= index_adjust_;
that_->limit_ -= limit_adjust_; that_->limit_ -= limit_adjust_;
...@@ -422,7 +424,6 @@ class ReadStringVisitor : public TqObjectVisitor { ...@@ -422,7 +424,6 @@ class ReadStringVisitor : public TqObjectVisitor {
ReadStringVisitor* that_; ReadStringVisitor* that_;
int32_t index_adjust_; int32_t index_adjust_;
int32_t limit_adjust_; int32_t limit_adjust_;
DISALLOW_COPY_AND_ASSIGN(IndexModifier);
}; };
static constexpr int kMaxCharacters = 80; // How many characters to print. static constexpr int kMaxCharacters = 80; // How many characters to print.
......
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