summaryrefslogtreecommitdiff
path: root/src/js_native_api_v8.cc
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2020-05-26 08:32:26 -0700
committerGabriel Schulhof <gabriel.schulhof@intel.com>2020-05-28 13:28:56 -0700
commit6a1df3b5afc92f438cf84621abd8cda79d9b1b17 (patch)
tree36b7d3e9ca804649ff86811e6cd05c7e1bc0e5b0 /src/js_native_api_v8.cc
parentfb33b673f1809aa51e5edda76ba6f29377b55893 (diff)
downloadnode-new-6a1df3b5afc92f438cf84621abd8cda79d9b1b17.tar.gz
n-api: remove `napi_env::CallIntoModuleThrow`
Give `napi_env::CallIntoModule` the thrower used by `CallIntoModuleThrow` as its default second argument. That way we do not need two different methods on `napi_env` for calling into the addon. PR-URL: https://github.com/nodejs/node/pull/33570 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/js_native_api_v8.cc')
-rw-r--r--src/js_native_api_v8.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc
index a09969b9ad..db53a104d6 100644
--- a/src/js_native_api_v8.cc
+++ b/src/js_native_api_v8.cc
@@ -267,7 +267,7 @@ class RefBase : protected Finalizer, RefTracker {
protected:
inline void Finalize(bool is_env_teardown = false) override {
if (_finalize_callback != nullptr) {
- _env->CallIntoModuleThrow([&](napi_env env) {
+ _env->CallIntoModule([&](napi_env env) {
_finalize_callback(
env,
_finalize_data,
@@ -475,7 +475,7 @@ class CallbackWrapperBase : public CallbackWrapper {
napi_callback cb = _bundle->*FunctionField;
napi_value result;
- env->CallIntoModuleThrow([&](napi_env env) {
+ env->CallIntoModule([&](napi_env env) {
result = cb(env, cbinfo_wrapper);
});