From 8bc8d4294d94bbcf4c6b41780e7e773eb2519ae1 Mon Sep 17 00:00:00 2001 From: LUA Ting-Gan Date: Fri, 14 Jun 2019 13:45:52 +0800 Subject: [PATCH] [ Fix ] Regenerate binding.cc --- build/config.gypi | 47 +++++++++++++++++++++++++++-------------------- src/binding.cc | 8 ++++---- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/build/config.gypi b/build/config.gypi index 5f30935..37c6f45 100644 --- a/build/config.gypi +++ b/build/config.gypi @@ -9,48 +9,54 @@ }, "variables": { "asan": 0, + "build_v8_with_gn": "false", "coverage": "false", - "debug_devtools": "node", + "debug_nghttp2": "false", + "enable_lto": "false", + "enable_pgo_generate": "false", + "enable_pgo_use": "false", "force_dynamic_crt": 0, "host_arch": "x64", - "icu_data_file": "icudt59l.dat", - "icu_data_in": "../../deps/icu-small/source/data/in/icudt59l.dat", + "icu_data_in": "../../deps/icu-small/source/data/in/icudt62l.dat", "icu_endianness": "l", "icu_gyp_path": "tools/icu/icu-generic.gyp", "icu_locales": "en,root", "icu_path": "deps/icu-small", "icu_small": "true", - "icu_ver_major": "59", - "llvm_version": 0, + "icu_ver_major": "62", + "llvm_version": "0", "node_byteorder": "little", + "node_debug_lib": "false", "node_enable_d8": "false", "node_enable_v8_vtunejit": "false", "node_install_npm": "true", - "node_module_version": 57, + "node_module_version": 64, "node_no_browser_globals": "false", - "node_prefix": "/", + "node_prefix": "/usr/local", "node_release_urlbase": "https://nodejs.org/download/release/", "node_shared": "false", "node_shared_cares": "false", "node_shared_http_parser": "false", "node_shared_libuv": "false", + "node_shared_nghttp2": "false", "node_shared_openssl": "false", "node_shared_zlib": "false", "node_tag": "", + "node_target_type": "executable", "node_use_bundled_v8": "true", "node_use_dtrace": "true", "node_use_etw": "false", - "node_use_lttng": "false", + "node_use_large_pages": "false", "node_use_openssl": "true", + "node_use_pch": "false", "node_use_perfctr": "false", "node_use_v8_platform": "true", + "node_with_ltcg": "false", "node_without_node_options": "false", "openssl_fips": "", "openssl_no_asm": 0, - "shlib_suffix": "57.dylib", + "shlib_suffix": "64.dylib", "target_arch": "x64", - "uv_parent_path": "/deps/uv/", - "uv_use_dtrace": "true", "v8_enable_gdbjit": 0, "v8_enable_i18n_support": 1, "v8_enable_inspector": 1, @@ -58,11 +64,12 @@ "v8_optimized_debug": 0, "v8_promise_internal_field_count": 1, "v8_random_seed": 0, + "v8_trace_maps": 0, + "v8_typed_array_max_size_in_heap": 0, "v8_use_snapshot": "true", "want_separate_host_toolset": 0, - "want_separate_host_toolset_mkpeephole": 0, "xcode_version": "7.0", - "nodedir": "/Users/banacorn/.node-gyp/8.0.0", + "nodedir": "/Users/banacorn/.node-gyp/10.15.3", "standalone_static_library": 1, "save_dev": "", "legacy_bundling": "", @@ -76,7 +83,7 @@ "rollback": "true", "usage": "", "audit": "true", - "globalignorefile": "/Users/banacorn/.nvm/versions/node/v8.0.0/etc/npmignore", + "globalignorefile": "/usr/local/etc/npmignore", "shell": "/bin/bash", "maxsockets": "50", "init_author_url": "", @@ -100,7 +107,7 @@ "versions": "", "message": "%s", "key": "", - "globalconfig": "/Users/banacorn/.nvm/versions/node/v8.0.0/etc/npmrc", + "globalconfig": "/usr/local/etc/npmrc", "prefer_online": "", "logs_max": "10", "always_auth": "", @@ -122,8 +129,8 @@ "userconfig": "/Users/banacorn/.npmrc", "init_module": "/Users/banacorn/.npm-init.js", "cidr": "", - "user": "501", - "node_version": "8.0.0", + "user": "", + "node_version": "10.15.3", "save": "true", "ignore_prepublish": "", "editor": "vi", @@ -139,7 +146,7 @@ "force": "", "bin_links": "true", "searchopts": "", - "node_gyp": "/Users/banacorn/.nvm/versions/node/v8.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", + "node_gyp": "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "depth": "Infinity", "sso_poll_frequency": "500", "rebuild_bundle": "true", @@ -167,7 +174,7 @@ "package_lock_only": "", "save_optional": "", "ignore_scripts": "", - "user_agent": "npm/6.4.1 node/v8.0.0 darwin x64", + "user_agent": "npm/6.4.1 node/v10.15.3 darwin x64", "cache_lock_wait": "10000", "production": "", "send_metrics": "", @@ -181,7 +188,7 @@ "unsafe_perm": "true", "tmp": "/var/folders/h9/y58_wdxn5p34b5d76ms1f1lc0000gn/T", "onload_script": "", - "prefix": "/Users/banacorn/.nvm/versions/node/v8.0.0", + "prefix": "/usr/local", "link": "" } } diff --git a/src/binding.cc b/src/binding.cc index 47f6c67..8659e1b 100644 --- a/src/binding.cc +++ b/src/binding.cc @@ -10,17 +10,17 @@ namespace { NAN_METHOD(New) {} -void Init(Handle exports, Handle module) { +void Init(Local exports, Local module) { Local tpl = Nan::New(New); tpl->SetClassName(Nan::New("Language").ToLocalChecked()); tpl->InstanceTemplate()->SetInternalFieldCount(1); - Local constructor = tpl->GetFunction(); + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); Nan::SetInternalFieldPointer(instance, 0, tree_sitter_agda()); - instance->Set(Nan::New("name").ToLocalChecked(), Nan::New("agda").ToLocalChecked()); - module->Set(Nan::New("exports").ToLocalChecked(), instance); + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("agda").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); } NODE_MODULE(tree_sitter_agda_binding, Init)