diff --git a/src/native/util/buf.h b/src/native/util/buf.h index 713a2fd49e..a2adf02145 100644 --- a/src/native/util/buf.h +++ b/src/native/util/buf.h @@ -167,12 +167,6 @@ class Buf return _alloc->detach(); } - inline bool - unique_alloc() - { - return _alloc.unique(); - } - inline bool same(const Buf& buf) const { diff --git a/src/native/util/nan.h b/src/native/util/nan.h index 78961ad55f..b86559d617 100644 --- a/src/native/util/nan.h +++ b/src/native/util/nan.h @@ -71,12 +71,6 @@ NanKey(std::string s) #define NAN_SET_NUM(obj, key, val) (NAN_SET(obj, key, Nan::New(val))) #define NAN_SET_BUF_COPY(obj, key, buf) \ (NAN_SET(obj, key, Nan::CopyBuffer(buf.cdata(), buf.length()).ToLocalChecked())) -#define NAN_SET_BUF_DETACH(obj, key, buf) \ - do { \ - assert(buf.unique_alloc()); \ - NAN_SET(obj, key, Nan::NewBuffer(buf.cdata(), buf.length()).ToLocalChecked()); \ - buf.detach_alloc(); \ - } while (0) #define NAN_ERR(msg) (Nan::To(Nan::Error(msg)).ToLocalChecked()) #define NAN_RETURN(val) \