Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
napi,lint: fixing lint errors in node_api_jsrt.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
MSLaguana committed Oct 3, 2017
1 parent ac5a059 commit f2c076f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/node_api_jsrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,12 @@ napi_status napi_define_properties(napi_env env,
size_t property_count,
const napi_property_descriptor* properties) {
JsPropertyIdRef configurableProperty;
CHECK_JSRT(JsCreatePropertyId(STR_AND_LENGTH("configurable"), &configurableProperty));
CHECK_JSRT(JsCreatePropertyId(STR_AND_LENGTH("configurable"),
&configurableProperty));

JsPropertyIdRef enumerableProperty;
CHECK_JSRT(JsCreatePropertyId(STR_AND_LENGTH("enumerable"), &enumerableProperty));
CHECK_JSRT(JsCreatePropertyId(STR_AND_LENGTH("enumerable"),
&enumerableProperty));

for (size_t i = 0; i < property_count; i++) {
const napi_property_descriptor* p = properties + i;
Expand Down Expand Up @@ -964,7 +966,8 @@ napi_status napi_define_properties(napi_env env,
RETURN_STATUS_IF_FALSE(p->value != nullptr, napi_invalid_arg);

JsPropertyIdRef writableProperty;
CHECK_JSRT(JsCreatePropertyId(STR_AND_LENGTH("writable"), &writableProperty));
CHECK_JSRT(JsCreatePropertyId(STR_AND_LENGTH("writable"),
&writableProperty));
JsValueRef writable;
CHECK_JSRT(JsBoolToBoolean((p->attributes & napi_writable), &writable));
CHECK_JSRT(JsSetProperty(descriptor, writableProperty, writable, true));
Expand Down Expand Up @@ -2739,7 +2742,8 @@ class Work: public node::AsyncResource {
JsValueRef exception;
JsPropertyIdRef exProp;

if (JsCreatePropertyId(STR_AND_LENGTH("exception"), &exProp) != JsNoError) {
if (JsCreatePropertyId(STR_AND_LENGTH("exception"), &exProp)
!= JsNoError) {
Fatal();
return;
}
Expand Down

0 comments on commit f2c076f

Please sign in to comment.