diff options
author | neta <neta@netush> | 2017-11-20 21:41:56 +0200 |
---|---|---|
committer | Michael Dawson <michael_dawson@ca.ibm.com> | 2017-11-22 10:04:29 -0500 |
commit | a4a9a3de6ecceeff915fb79aa43457b3b3a3fe59 (patch) | |
tree | 32faf15aec1f683ccc0f3bb7cd9c27c00a330ad7 /src/node_api.cc | |
parent | 7fd8a211fb91e531a0cb8067934ba0db59c84e68 (diff) | |
download | android-node-v8-a4a9a3de6ecceeff915fb79aa43457b3b3a3fe59.tar.gz android-node-v8-a4a9a3de6ecceeff915fb79aa43457b3b3a3fe59.tar.bz2 android-node-v8-a4a9a3de6ecceeff915fb79aa43457b3b3a3fe59.zip |
src: add napi_handle_scope_mismatch to msg list
PR-URL: https://github.com/nodejs/node/pull/17161
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r-- | src/node_api.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/node_api.cc b/src/node_api.cc index 84e57d03d6..59ea763512 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -901,7 +901,8 @@ const char* error_messages[] = {nullptr, "Unknown failure", "An exception is pending", "The async work item was cancelled", - "napi_escape_handle already called on scope"}; + "napi_escape_handle already called on scope", + "Invalid handle scope usage"}; static inline napi_status napi_clear_last_error(napi_env env) { env->last_error.error_code = napi_ok; @@ -932,9 +933,9 @@ napi_status napi_get_last_error_info(napi_env env, // We don't have a napi_status_last as this would result in an ABI // change each time a message was added. static_assert( - node::arraysize(error_messages) == napi_escape_called_twice + 1, + node::arraysize(error_messages) == napi_handle_scope_mismatch + 1, "Count of error messages must match count of error values"); - CHECK_LE(env->last_error.error_code, napi_escape_called_twice); + CHECK_LE(env->last_error.error_code, napi_handle_scope_mismatch); // Wait until someone requests the last error information to fetch the error // message string |