File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1729,6 +1729,10 @@ namespace Napi {
1729
1729
explicit HandleScope (Napi::Env env);
1730
1730
~HandleScope ();
1731
1731
1732
+ // Disallow copying to prevent double close of napi_handle_scope
1733
+ HandleScope (HandleScope const &) = delete ;
1734
+ void operator =(HandleScope const &) = delete ;
1735
+
1732
1736
operator napi_handle_scope () const ;
1733
1737
1734
1738
Napi::Env Env () const ;
@@ -1744,6 +1748,10 @@ namespace Napi {
1744
1748
explicit EscapableHandleScope (Napi::Env env);
1745
1749
~EscapableHandleScope ();
1746
1750
1751
+ // Disallow copying to prevent double close of napi_escapable_handle_scope
1752
+ EscapableHandleScope (EscapableHandleScope const &) = delete ;
1753
+ void operator =(EscapableHandleScope const &) = delete ;
1754
+
1747
1755
operator napi_escapable_handle_scope () const ;
1748
1756
1749
1757
Napi::Env Env () const ;
@@ -1761,6 +1769,10 @@ namespace Napi {
1761
1769
CallbackScope (napi_env env, napi_async_context context);
1762
1770
virtual ~CallbackScope ();
1763
1771
1772
+ // Disallow copying to prevent double close of napi_callback_scope
1773
+ CallbackScope (CallbackScope const &) = delete ;
1774
+ void operator =(CallbackScope const &) = delete ;
1775
+
1764
1776
operator napi_callback_scope () const ;
1765
1777
1766
1778
Napi::Env Env () const ;
You can’t perform that action at this time.
0 commit comments