mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
src: replace assert with CHECK_LE in node_api.cc
PR-URL: https://github.com/nodejs/node/pull/14514 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jason Ginchereau <jasongin@microsoft.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nie�en <tniessen@tnie.de>
This commit is contained in:
1 parent
41a0dfcd97
commit
f3afe29e19
1 file changed
+1
-2
+1
-2
@@ -12,7 +12,6 @@
|
||||
#include <node_object_wrap.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include "uv.h"
|
||||
@@ -852,7 +851,7 @@ napi_status napi_get_last_error_info(napi_env env,
|
||||
static_assert(
|
||||
node::arraysize(error_messages) == napi_escape_called_twice + 1,
|
||||
"Count of error messages must match count of error values");
|
||||
assert(env->last_error.error_code <= napi_escape_called_twice);
|
||||
CHECK_LE(env->last_error.error_code, napi_escape_called_twice);
|
||||
|
||||
// Wait until someone requests the last error information to fetch the error
|
||||
// message string
|
||||
|
||||
Reference in new issue
Block a user