Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 838924aefa1810f8e7d4360ae1124c6ef45d8b9a..209ac2c24af456f5fb400e27d5b4c328ad567ce6 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -882,6 +882,8 @@ class V8_EXPORT HandleScope { |
HandleScope(const HandleScope&) = delete; |
void operator=(const HandleScope&) = delete; |
+ void* operator new(size_t size) = delete; |
+ void operator delete(void*, size_t) = delete; |
protected: |
V8_INLINE HandleScope() {} |
@@ -896,11 +898,6 @@ class V8_EXPORT HandleScope { |
static internal::Object** CreateHandle(internal::HeapObject* heap_object, |
internal::Object* value); |
- // Make it hard to create heap-allocated or illegal handle scopes by |
- // disallowing certain operations. |
- void* operator new(size_t size); |
- void operator delete(void*, size_t); |
- |
internal::Isolate* isolate_; |
internal::Object** prev_next_; |
internal::Object** prev_limit_; |
@@ -937,15 +934,11 @@ class V8_EXPORT EscapableHandleScope : public HandleScope { |
EscapableHandleScope(const EscapableHandleScope&) = delete; |
void operator=(const EscapableHandleScope&) = delete; |
+ void* operator new(size_t size) = delete; |
+ void operator delete(void*, size_t) = delete; |
private: |
internal::Object** Escape(internal::Object** escape_value); |
- |
- // Make it hard to create heap-allocated or illegal handle scopes by |
- // disallowing certain operations. |
- void* operator new(size_t size); |
- void operator delete(void*, size_t); |
- |
internal::Object** escape_slot_; |
}; |
@@ -956,13 +949,10 @@ class V8_EXPORT SealHandleScope { |
SealHandleScope(const SealHandleScope&) = delete; |
void operator=(const SealHandleScope&) = delete; |
+ void* operator new(size_t size) = delete; |
+ void operator delete(void*, size_t) = delete; |
private: |
- // Make it hard to create heap-allocated or illegal handle scopes by |
- // disallowing certain operations. |
- void* operator new(size_t size); |
- void operator delete(void*, size_t); |
- |
internal::Isolate* const isolate_; |
internal::Object** prev_limit_; |
int prev_sealed_level_; |
@@ -6470,18 +6460,17 @@ class V8_EXPORT Isolate { |
*/ |
bool IsInUse(); |
+ Isolate() = delete; |
+ ~Isolate() = delete; |
Isolate(const Isolate&) = delete; |
Isolate& operator=(const Isolate&) = delete; |
+ void* operator new(size_t size) = delete; |
+ void operator delete(void*, size_t) = delete; |
private: |
template <class K, class V, class Traits> |
friend class PersistentValueMapBase; |
- Isolate(); |
- ~Isolate(); |
- void* operator new(size_t size); |
- void operator delete(void*, size_t); |
- |
void SetObjectGroupId(internal::Object** object, UniqueId id); |
void SetReferenceFromGroup(UniqueId id, internal::Object** object); |
void SetReference(internal::Object** parent, internal::Object** child); |
@@ -7147,14 +7136,12 @@ class V8_EXPORT TryCatch { |
TryCatch(const TryCatch&) = delete; |
void operator=(const TryCatch&) = delete; |
+ void* operator new(size_t size) = delete; |
+ void operator delete(void*, size_t) = delete; |
private: |
void ResetInternal(); |
- // Make it hard to create heap-allocated TryCatch blocks. |
- void* operator new(size_t size); |
- void operator delete(void*, size_t); |
- |
v8::internal::Isolate* isolate_; |
v8::TryCatch* next_; |
void* exception_; |