refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)

This commit is contained in:
Milan Burda 2021-11-03 12:41:45 +01:00 committed by GitHub
parent 2a2a1a834c
commit 65a980c673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
231 changed files with 918 additions and 576 deletions

View file

@ -5,7 +5,6 @@
#ifndef SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_
#define SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "v8/include/v8.h"
@ -16,6 +15,10 @@ class ObjectLifeMonitor {
ObjectLifeMonitor(v8::Isolate* isolate, v8::Local<v8::Object> target);
virtual ~ObjectLifeMonitor();
// disable copy
ObjectLifeMonitor(const ObjectLifeMonitor&) = delete;
ObjectLifeMonitor& operator=(const ObjectLifeMonitor&) = delete;
virtual void RunDestructor() = 0;
private:
@ -25,8 +28,6 @@ class ObjectLifeMonitor {
v8::Global<v8::Object> target_;
base::WeakPtrFactory<ObjectLifeMonitor> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(ObjectLifeMonitor);
};
} // namespace electron