diff --git a/nan_scriptorigin.h b/nan_scriptorigin.h index 04e55cf5..6d8251fd 100644 --- a/nan_scriptorigin.h +++ b/nan_scriptorigin.h @@ -11,24 +11,28 @@ class ScriptOrigin : public v8::ScriptOrigin { public: - -#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 11 \ - && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 7) +#if defined(V8_MAJOR_VERSION) && \ + (V8_MAJOR_VERSION > 12 || \ + (V8_MAJOR_VERSION == 12 && \ + (defined(V8_MINOR_VERSION) && \ + (V8_MINOR_VERSION > 6 || \ + (V8_MINOR_VERSION == 6 && defined(V8_BUILD_NUMBER) && \ + V8_BUILD_NUMBER >= 175))))) explicit ScriptOrigin(v8::Local name) : v8::ScriptOrigin(name) {} ScriptOrigin(v8::Local name , v8::Local line) : v8::ScriptOrigin(name - , To(line).FromMaybe(0)) {} + , To(line).FromMaybe(0)) {} ScriptOrigin(v8::Local name , v8::Local line , v8::Local column) : v8::ScriptOrigin(name - , To(line).FromMaybe(0) - , To(column).FromMaybe(0)) {} -#elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ + , To(line).FromMaybe(0) + , To(column).FromMaybe(0)) {} +#elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ (V8_MAJOR_VERSION == 9 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 0\ || (V8_MINOR_VERSION == 0 && defined(V8_BUILD_NUMBER) \ && V8_BUILD_NUMBER >= 1)))))