@@ -426,6 +426,8 @@ class IsolateData {
426
426
427
427
std::unordered_map<nghttp2_rcbuf*, v8::Eternal<v8::String>> http2_static_strs;
428
428
inline v8::Isolate* isolate () const ;
429
+ IsolateData (const IsolateData&) = delete ;
430
+ IsolateData& operator =(const IsolateData&) = delete ;
429
431
430
432
private:
431
433
#define VP (PropertyName, StringValue ) V(v8::Private, PropertyName)
@@ -448,8 +450,6 @@ class IsolateData {
448
450
const bool uses_node_allocator_;
449
451
MultiIsolatePlatform* platform_;
450
452
std::shared_ptr<PerIsolateOptions> options_;
451
-
452
- DISALLOW_COPY_AND_ASSIGN (IsolateData);
453
453
};
454
454
455
455
struct ContextInfo {
@@ -534,6 +534,9 @@ class AsyncRequest : public MemoryRetainer {
534
534
535
535
class Environment {
536
536
public:
537
+ Environment (const Environment&) = delete ;
538
+ Environment& operator =(const Environment&) = delete ;
539
+
537
540
class AsyncHooks {
538
541
public:
539
542
// Reason for both UidFields and Fields are that one is stored as a double*
@@ -571,6 +574,9 @@ class Environment {
571
574
inline bool pop_async_id (double async_id);
572
575
inline void clear_async_id_stack (); // Used in fatal exceptions.
573
576
577
+ AsyncHooks (const AsyncHooks&) = delete ;
578
+ AsyncHooks& operator =(const AsyncHooks&) = delete ;
579
+
574
580
// Used to set the kDefaultTriggerAsyncId in a scope. This is instead of
575
581
// passing the trigger_async_id along with other constructor arguments.
576
582
class DefaultTriggerAsyncIdScope {
@@ -581,11 +587,13 @@ class Environment {
581
587
explicit DefaultTriggerAsyncIdScope (AsyncWrap* async_wrap);
582
588
~DefaultTriggerAsyncIdScope ();
583
589
590
+ DefaultTriggerAsyncIdScope (const DefaultTriggerAsyncIdScope&) = delete ;
591
+ DefaultTriggerAsyncIdScope& operator =(const DefaultTriggerAsyncIdScope&) =
592
+ delete ;
593
+
584
594
private:
585
595
AsyncHooks* async_hooks_;
586
596
double old_default_trigger_async_id_;
587
-
588
- DISALLOW_COPY_AND_ASSIGN (DefaultTriggerAsyncIdScope);
589
597
};
590
598
591
599
@@ -603,20 +611,18 @@ class Environment {
603
611
AliasedBuffer<double , v8::Float64Array> async_id_fields_;
604
612
605
613
void grow_async_ids_stack ();
606
-
607
- DISALLOW_COPY_AND_ASSIGN (AsyncHooks);
608
614
};
609
615
610
616
class AsyncCallbackScope {
611
617
public:
612
618
AsyncCallbackScope () = delete ;
613
619
explicit AsyncCallbackScope (Environment* env);
614
620
~AsyncCallbackScope ();
621
+ AsyncCallbackScope (const AsyncCallbackScope&) = delete ;
622
+ AsyncCallbackScope& operator =(const AsyncCallbackScope&) = delete ;
615
623
616
624
private:
617
625
Environment* env_;
618
-
619
- DISALLOW_COPY_AND_ASSIGN (AsyncCallbackScope);
620
626
};
621
627
622
628
inline size_t makecallback_depth () const ;
@@ -634,6 +640,9 @@ class Environment {
634
640
inline void ref_count_inc (uint32_t increment);
635
641
inline void ref_count_dec (uint32_t decrement);
636
642
643
+ ImmediateInfo (const ImmediateInfo&) = delete ;
644
+ ImmediateInfo& operator =(const ImmediateInfo&) = delete ;
645
+
637
646
private:
638
647
friend class Environment ; // So we can call the constructor.
639
648
inline explicit ImmediateInfo (v8::Isolate* isolate);
@@ -646,8 +655,6 @@ class Environment {
646
655
};
647
656
648
657
AliasedBuffer<uint32_t , v8::Uint32Array> fields_;
649
-
650
- DISALLOW_COPY_AND_ASSIGN (ImmediateInfo);
651
658
};
652
659
653
660
class TickInfo {
@@ -656,6 +663,9 @@ class Environment {
656
663
inline bool has_tick_scheduled () const ;
657
664
inline bool has_rejection_to_warn () const ;
658
665
666
+ TickInfo (const TickInfo&) = delete ;
667
+ TickInfo& operator =(const TickInfo&) = delete ;
668
+
659
669
private:
660
670
friend class Environment ; // So we can call the constructor.
661
671
inline explicit TickInfo (v8::Isolate* isolate);
@@ -667,8 +677,6 @@ class Environment {
667
677
};
668
678
669
679
AliasedBuffer<uint8_t , v8::Uint8Array> fields_;
670
-
671
- DISALLOW_COPY_AND_ASSIGN (TickInfo);
672
680
};
673
681
674
682
enum Flags {
@@ -1211,8 +1219,6 @@ class Environment {
1211
1219
#define V (PropertyName, TypeName ) Persistent<TypeName> PropertyName ## _;
1212
1220
ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES (V)
1213
1221
#undef V
1214
-
1215
- DISALLOW_COPY_AND_ASSIGN (Environment);
1216
1222
};
1217
1223
1218
1224
} // namespace node
0 commit comments