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

[cleanup][api] Remove uses of DISALLOW_COPY_AND_ASSIGN

Bug: v8:11074
Change-Id: I4158b4ad72350cde27bda76db2d9d646b793f684
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2558265Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71469}
parent a3129821
...@@ -74,6 +74,12 @@ class PropertyCallbackArguments ...@@ -74,6 +74,12 @@ class PropertyCallbackArguments
PropertyCallbackArguments(Isolate* isolate, Object data, Object self, PropertyCallbackArguments(Isolate* isolate, Object data, Object self,
JSObject holder, Maybe<ShouldThrow> should_throw); JSObject holder, Maybe<ShouldThrow> should_throw);
// Don't copy PropertyCallbackArguments, because they would both have the
// same prev_ pointer.
PropertyCallbackArguments(const PropertyCallbackArguments&) = delete;
PropertyCallbackArguments& operator=(const PropertyCallbackArguments&) =
delete;
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// Accessor Callbacks // Accessor Callbacks
// Also used for AccessorSetterCallback. // Also used for AccessorSetterCallback.
...@@ -141,10 +147,6 @@ class PropertyCallbackArguments ...@@ -141,10 +147,6 @@ class PropertyCallbackArguments
inline JSObject holder(); inline JSObject holder();
inline Object receiver(); inline Object receiver();
// Don't copy PropertyCallbackArguments, because they would both have the
// same prev_ pointer.
DISALLOW_COPY_AND_ASSIGN(PropertyCallbackArguments);
}; };
class FunctionCallbackArguments class FunctionCallbackArguments
......
...@@ -329,6 +329,9 @@ class V8_NODISCARD CallDepthScope { ...@@ -329,6 +329,9 @@ class V8_NODISCARD CallDepthScope {
isolate_->set_next_v8_call_is_safe_for_termination(safe_for_termination_); isolate_->set_next_v8_call_is_safe_for_termination(safe_for_termination_);
} }
CallDepthScope(const CallDepthScope&) = delete;
CallDepthScope& operator=(const CallDepthScope&) = delete;
void Escape() { void Escape() {
DCHECK(!escaped_); DCHECK(!escaped_);
escaped_ = true; escaped_ = true;
...@@ -361,7 +364,6 @@ class V8_NODISCARD CallDepthScope { ...@@ -361,7 +364,6 @@ class V8_NODISCARD CallDepthScope {
friend class i::ThreadLocalTop; friend class i::ThreadLocalTop;
DISALLOW_NEW_AND_DELETE() DISALLOW_NEW_AND_DELETE()
DISALLOW_COPY_AND_ASSIGN(CallDepthScope);
}; };
} // namespace } // namespace
...@@ -5294,6 +5296,9 @@ static inline const uint16_t* Align(const uint16_t* chars) { ...@@ -5294,6 +5296,9 @@ static inline const uint16_t* Align(const uint16_t* chars) {
class ContainsOnlyOneByteHelper { class ContainsOnlyOneByteHelper {
public: public:
ContainsOnlyOneByteHelper() : is_one_byte_(true) {} ContainsOnlyOneByteHelper() : is_one_byte_(true) {}
ContainsOnlyOneByteHelper(const ContainsOnlyOneByteHelper&) = delete;
ContainsOnlyOneByteHelper& operator=(const ContainsOnlyOneByteHelper&) =
delete;
bool Check(i::String string) { bool Check(i::String string) {
i::ConsString cons_string = i::String::VisitFlat(this, string, 0); i::ConsString cons_string = i::String::VisitFlat(this, string, 0);
if (cons_string.is_null()) return is_one_byte_; if (cons_string.is_null()) return is_one_byte_;
...@@ -5374,7 +5379,6 @@ class ContainsOnlyOneByteHelper { ...@@ -5374,7 +5379,6 @@ class ContainsOnlyOneByteHelper {
return is_one_byte_; return is_one_byte_;
} }
bool is_one_byte_; bool is_one_byte_;
DISALLOW_COPY_AND_ASSIGN(ContainsOnlyOneByteHelper);
}; };
bool String::ContainsOnlyOneByte() const { bool String::ContainsOnlyOneByte() const {
......
...@@ -340,6 +340,9 @@ class HandleScopeImplementer { ...@@ -340,6 +340,9 @@ class HandleScopeImplementer {
~HandleScopeImplementer() { DeleteArray(spare_); } ~HandleScopeImplementer() { DeleteArray(spare_); }
HandleScopeImplementer(const HandleScopeImplementer&) = delete;
HandleScopeImplementer& operator=(const HandleScopeImplementer&) = delete;
// Threading support for handle data. // Threading support for handle data.
static int ArchiveSpacePerThread(); static int ArchiveSpacePerThread();
char* RestoreThread(char* from); char* RestoreThread(char* from);
...@@ -436,8 +439,6 @@ class HandleScopeImplementer { ...@@ -436,8 +439,6 @@ class HandleScopeImplementer {
friend class HandleScopeImplementerOffsets; friend class HandleScopeImplementerOffsets;
friend class PersistentHandlesScope; friend class PersistentHandlesScope;
DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer);
}; };
const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page
......
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