Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9832b8e

Browse filesBrowse files
netaMylesBorins
authored andcommitted
src: add napi_handle_scope_mismatch to msg list
PR-URL: #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>
1 parent 72e480d commit 9832b8e
Copy full SHA for 9832b8e

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Open diff view settings
Collapse file

‎src/node_api.cc‎

Copy file name to clipboardExpand all lines: src/node_api.cc
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,8 @@ const char* error_messages[] = {nullptr,
901901
"Unknown failure",
902902
"An exception is pending",
903903
"The async work item was cancelled",
904-
"napi_escape_handle already called on scope"};
904+
"napi_escape_handle already called on scope",
905+
"Invalid handle scope usage"};
905906

906907
static inline napi_status napi_clear_last_error(napi_env env) {
907908
env->last_error.error_code = napi_ok;
@@ -932,9 +933,9 @@ napi_status napi_get_last_error_info(napi_env env,
932933
// We don't have a napi_status_last as this would result in an ABI
933934
// change each time a message was added.
934935
static_assert(
935-
node::arraysize(error_messages) == napi_escape_called_twice + 1,
936+
node::arraysize(error_messages) == napi_handle_scope_mismatch + 1,
936937
"Count of error messages must match count of error values");
937-
CHECK_LE(env->last_error.error_code, napi_escape_called_twice);
938+
CHECK_LE(env->last_error.error_code, napi_handle_scope_mismatch);
938939

939940
// Wait until someone requests the last error information to fetch the error
940941
// message string

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.