Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <vector>
#include "uv.h"
#include "node_api.h"
#include "node_internals.h"

// We must avoid making use of node internals because this file must compile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super-nitpicky- consider pointing to node-addon-api as an example here

// outside of node as well.

#define NAPI_VERSION 1

Expand Down Expand Up @@ -759,7 +761,8 @@ 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,
(sizeof (error_messages) / sizeof (*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);

Expand Down