diff --git a/src/node_api.cc b/src/node_api.cc index a8fd789955384a..6e9f9bbc07e176 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #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 diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 9f4ab846cb8b15..61ab265ce193b4 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -2699,18 +2699,6 @@ int Connection::HandleSSLError(const char* func, } -void Connection::ClearError() { -#ifndef NDEBUG - HandleScope scope(ssl_env()->isolate()); - - // We should clear the error in JS-land - Local error_key = ssl_env()->error_string(); - Local error = object()->Get(error_key); - CHECK_EQ(error->BooleanValue(), false); -#endif // NDEBUG -} - - void Connection::SetShutdownFlags() { HandleScope scope(ssl_env()->isolate()); diff --git a/src/node_crypto.h b/src/node_crypto.h index b406fb8aa6867d..3abfe973a79ebd 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -390,7 +390,6 @@ class Connection : public AsyncWrap, public SSLWrap { int HandleSSLError(const char* func, int rv, ZeroStatus zs, SyscallStatus ss); - void ClearError(); void SetShutdownFlags(); Connection(Environment* env,