Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
squash: address comments
  • Loading branch information
mhdawson committed Jun 21, 2017
commit 08c3151c1217d099e9e6b9ad398680fcc69944b3
8 changes: 4 additions & 4 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <vector>
#include "uv.h"
#include "node_api.h"
#include "node_internals.h"

#define NAPI_VERSION 1

Expand Down Expand Up @@ -156,8 +157,8 @@ class HandleScopeWrapper {
// across different versions.
class EscapableHandleScopeWrapper {
public:
explicit EscapableHandleScopeWrapper(v8::Isolate* isolate) :
scope(isolate), escape_called_(false) {}
explicit EscapableHandleScopeWrapper(v8::Isolate* isolate)
: scope(isolate), escape_called_(false) {}
bool escape_called() const {
return escape_called_;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Style issues: method should be bool escape_called() const {, the data member should be escape_called_.

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

Expand Down