diff --git a/nan_converters_43_inl.h b/nan_converters_43_inl.h index ef483e50..41b72deb 100644 --- a/nan_converters_43_inl.h +++ b/nan_converters_43_inl.h @@ -25,7 +25,8 @@ X(Object) X(Integer) X(Uint32) X(Int32) -#if NODE_MODULE_VERSION <= NODE_11_0_MODULE_VERSION +// V8 <= 7.0 +#if V8_MAJOR_VERSION < 7 || (V8_MAJOR_VERSION == 7 && V8_MINOR_VERSION == 0) X(Boolean) #else imp::ToFactory::return_t \ @@ -50,7 +51,8 @@ X(double, Number) X(int64_t, Integer) X(uint32_t, Uint32) X(int32_t, Int32) -#if NODE_MODULE_VERSION <= NODE_11_0_MODULE_VERSION +// V8 <= 7.0 +#if V8_MAJOR_VERSION < 7 || (V8_MAJOR_VERSION == 7 && V8_MINOR_VERSION == 0) X(bool, Boolean) #else imp::ToFactory::return_t \ diff --git a/nan_implementation_12_inl.h b/nan_implementation_12_inl.h index 9af2629e..8756e6ee 100644 --- a/nan_implementation_12_inl.h +++ b/nan_implementation_12_inl.h @@ -345,7 +345,8 @@ Factory::New(ExternalOneByteStringResource * value) { // TODO(bnoordhuis) Use isolate-based version in Node.js v12. Factory::return_t Factory::New(v8::Local value) { -#if NODE_MODULE_VERSION > NODE_11_0_MODULE_VERSION +// V8 > 7.0 +#if V8_MAJOR_VERSION > 7 || (V8_MAJOR_VERSION == 7 && V8_MINOR_VERSION > 0) return v8::StringObject::New(v8::Isolate::GetCurrent(), value).As(); #else #ifdef _MSC_VER