Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check V8 version directly instead of inferring from NMV #840

Merged
merged 1 commit into from Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions nan_converters_43_inl.h
Expand Up @@ -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<v8::Boolean>::return_t \
Expand All @@ -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<bool>::return_t \
Expand Down
3 changes: 2 additions & 1 deletion nan_implementation_12_inl.h
Expand Up @@ -345,7 +345,8 @@ Factory<v8::String>::New(ExternalOneByteStringResource * value) {
// TODO(bnoordhuis) Use isolate-based version in Node.js v12.
Factory<v8::StringObject>::return_t
Factory<v8::StringObject>::New(v8::Local<v8::String> 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<v8::StringObject>();
#else
#ifdef _MSC_VER
Expand Down