From 3f6da6a062808b3fa649c233371e619b2b2c15bc Mon Sep 17 00:00:00 2001 From: Benjamin Byholm Date: Tue, 13 Oct 2015 01:17:09 +0300 Subject: [PATCH] Do not reset globals when set as returnvalues --- nan_callbacks_12_inl.h | 1 - nan_callbacks_pre_12_inl.h | 1 - 2 files changed, 2 deletions(-) diff --git a/nan_callbacks_12_inl.h b/nan_callbacks_12_inl.h index b20d68fb..cce4425d 100644 --- a/nan_callbacks_12_inl.h +++ b/nan_callbacks_12_inl.h @@ -38,7 +38,6 @@ class ReturnValue { value_.Set(handle); #else value_.Set(*reinterpret_cast*>(&handle)); - const_cast &>(handle).Reset(); #endif } diff --git a/nan_callbacks_pre_12_inl.h b/nan_callbacks_pre_12_inl.h index 9a01443f..22a8ac30 100644 --- a/nan_callbacks_pre_12_inl.h +++ b/nan_callbacks_pre_12_inl.h @@ -40,7 +40,6 @@ class ReturnValue { TYPE_CHECK(T, S); value_->Dispose(); *value_ = v8::Persistent::New(handle.persistent); - const_cast &>(handle).Reset(); } // Fast primitive setters