Skip to content

Commit

Permalink
remove Isolate from ScriptOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoopa committed Aug 26, 2024
1 parent 9fa23b7 commit 0151569
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion nan_scriptorigin.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,27 @@

class ScriptOrigin : public v8::ScriptOrigin {
public:
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \
#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<v8::Value> name) :
v8::ScriptOrigin(name) {}

ScriptOrigin(v8::Local<v8::Value> name
, v8::Local<v8::Integer> line) :
v8::ScriptOrigin(name , To<int32_t>(line).FromMaybe(0)) {}

ScriptOrigin(v8::Local<v8::Value> name
, v8::Local<v8::Integer> line
, v8::Local<v8::Integer> column) :
v8::ScriptOrigin(name
, To<int32_t>(line).FromMaybe(0)
, To<int32_t>(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)))))
Expand Down

0 comments on commit 0151569

Please sign in to comment.