Merge branch 'pr/new-node-fixes'

* pr/new-node-fixes:
  Travis testing: Node 12 support not fully working yet
  Revert "Merge pull request #3 from tungntpham/new-node-fixes-refactor"
  OPTIM: Restructured the code where it checks for V8 version, removing duplicate code and potentially improving the readability.
  Nodejs: run tests against Node.js v12
  Add support for Node.js v12
  Replace Handle with Local depending on Node.js version
  Introduce macros to support both Handle and Local types
This commit is contained in:
William S Fulton 2021-02-24 22:14:47 +00:00
commit 7b37c8cd02
12 changed files with 160 additions and 84 deletions

View file

@ -15,7 +15,7 @@ int placeholder() { return 0; }
static SwigV8ReturnValue JavaScript_do_work(const SwigV8Arguments &args) {
SWIGV8_HANDLESCOPE();
const int MY_MAGIC_NUMBER = 5;
v8::Handle<v8::Value> jsresult =
SWIGV8_VALUE jsresult =
SWIG_From_int(static_cast< int >(MY_MAGIC_NUMBER));
if (args.Length() != 0)
SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments.");

View file

@ -53,7 +53,7 @@ extern "C" JNIEXPORT jint JNICALL Java_native_1directive_native_1directiveJNI_Co
static SwigV8ReturnValue JavaScript_alpha_count(const SwigV8Arguments &args) {
SWIGV8_HANDLESCOPE();
v8::Handle<v8::Value> jsresult;
SWIGV8_VALUE jsresult;
char *arg1 = (char *)0;
int res1;
char *buf1 = 0;