@@ -426,6 +426,8 @@ class IsolateData {
426426
427427 std::unordered_map<nghttp2_rcbuf*, v8::Eternal<v8::String>> http2_static_strs;
428428 inline v8::Isolate* isolate () const ;
429+ IsolateData (const IsolateData&) = delete ;
430+ IsolateData& operator =(const IsolateData&) = delete ;
429431
430432 private:
431433#define VP (PropertyName, StringValue ) V(v8::Private, PropertyName)
@@ -448,8 +450,6 @@ class IsolateData {
448450 const bool uses_node_allocator_;
449451 MultiIsolatePlatform* platform_;
450452 std::shared_ptr<PerIsolateOptions> options_;
451-
452- DISALLOW_COPY_AND_ASSIGN (IsolateData);
453453};
454454
455455struct ContextInfo {
@@ -534,6 +534,9 @@ class AsyncRequest : public MemoryRetainer {
534534
535535class Environment {
536536 public:
537+ Environment (const Environment&) = delete ;
538+ Environment& operator =(const Environment&) = delete ;
539+
537540 class AsyncHooks {
538541 public:
539542 // Reason for both UidFields and Fields are that one is stored as a double*
@@ -571,6 +574,9 @@ class Environment {
571574 inline bool pop_async_id (double async_id);
572575 inline void clear_async_id_stack (); // Used in fatal exceptions.
573576
577+ AsyncHooks (const AsyncHooks&) = delete ;
578+ AsyncHooks& operator =(const AsyncHooks&) = delete ;
579+
574580 // Used to set the kDefaultTriggerAsyncId in a scope. This is instead of
575581 // passing the trigger_async_id along with other constructor arguments.
576582 class DefaultTriggerAsyncIdScope {
@@ -581,11 +587,13 @@ class Environment {
581587 explicit DefaultTriggerAsyncIdScope (AsyncWrap* async_wrap);
582588 ~DefaultTriggerAsyncIdScope ();
583589
590+ DefaultTriggerAsyncIdScope (const DefaultTriggerAsyncIdScope&) = delete ;
591+ DefaultTriggerAsyncIdScope& operator =(const DefaultTriggerAsyncIdScope&) =
592+ delete ;
593+
584594 private:
585595 AsyncHooks* async_hooks_;
586596 double old_default_trigger_async_id_;
587-
588- DISALLOW_COPY_AND_ASSIGN (DefaultTriggerAsyncIdScope);
589597 };
590598
591599
@@ -603,20 +611,18 @@ class Environment {
603611 AliasedBuffer<double , v8::Float64Array> async_id_fields_;
604612
605613 void grow_async_ids_stack ();
606-
607- DISALLOW_COPY_AND_ASSIGN (AsyncHooks);
608614 };
609615
610616 class AsyncCallbackScope {
611617 public:
612618 AsyncCallbackScope () = delete ;
613619 explicit AsyncCallbackScope (Environment* env);
614620 ~AsyncCallbackScope ();
621+ AsyncCallbackScope (const AsyncCallbackScope&) = delete ;
622+ AsyncCallbackScope& operator =(const AsyncCallbackScope&) = delete ;
615623
616624 private:
617625 Environment* env_;
618-
619- DISALLOW_COPY_AND_ASSIGN (AsyncCallbackScope);
620626 };
621627
622628 inline size_t makecallback_depth () const ;
@@ -634,6 +640,9 @@ class Environment {
634640 inline void ref_count_inc (uint32_t increment);
635641 inline void ref_count_dec (uint32_t decrement);
636642
643+ ImmediateInfo (const ImmediateInfo&) = delete ;
644+ ImmediateInfo& operator =(const ImmediateInfo&) = delete ;
645+
637646 private:
638647 friend class Environment ; // So we can call the constructor.
639648 inline explicit ImmediateInfo (v8::Isolate* isolate);
@@ -646,8 +655,6 @@ class Environment {
646655 };
647656
648657 AliasedBuffer<uint32_t , v8::Uint32Array> fields_;
649-
650- DISALLOW_COPY_AND_ASSIGN (ImmediateInfo);
651658 };
652659
653660 class TickInfo {
@@ -656,6 +663,9 @@ class Environment {
656663 inline bool has_tick_scheduled () const ;
657664 inline bool has_rejection_to_warn () const ;
658665
666+ TickInfo (const TickInfo&) = delete ;
667+ TickInfo& operator =(const TickInfo&) = delete ;
668+
659669 private:
660670 friend class Environment ; // So we can call the constructor.
661671 inline explicit TickInfo (v8::Isolate* isolate);
@@ -667,8 +677,6 @@ class Environment {
667677 };
668678
669679 AliasedBuffer<uint8_t , v8::Uint8Array> fields_;
670-
671- DISALLOW_COPY_AND_ASSIGN (TickInfo);
672680 };
673681
674682 enum Flags {
@@ -1211,8 +1219,6 @@ class Environment {
12111219#define V (PropertyName, TypeName ) Persistent<TypeName> PropertyName ## _;
12121220 ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES (V)
12131221#undef V
1214-
1215- DISALLOW_COPY_AND_ASSIGN (Environment);
12161222};
12171223
12181224} // namespace node
0 commit comments