Skip to content

Commit e547941

Browse files
authored
tests: adapt for v8 8.9 (#910)
V8 API for ScriptOrigin constructor has changed. Adapt test to compile with v8 8.9. Currently only `ScriptOrigin` instances are consumed by NAN therefore no adaptions in the NAN API are needed to keep build/tests working.
1 parent 7c3fc68 commit e547941

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/cpp/nannew.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,12 @@ NAN_METHOD(testScript) {
246246

247247
t.plan(6);
248248

249+
#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \
250+
(V8_MAJOR_VERSION == 8 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 9))
251+
ScriptOrigin origin(New("foo").ToLocalChecked(), 5);
252+
#else
249253
ScriptOrigin origin(New("foo").ToLocalChecked(), New(5));
254+
#endif
250255

251256
t.ok(_( assertType<Script>(New<Script>(
252257
New("2 + 3").ToLocalChecked()).ToLocalChecked())));

0 commit comments

Comments
 (0)