From 00702bb1ed6c1c7dfac4c156512b47a557555032 Mon Sep 17 00:00:00 2001 From: Jack Horton Date: Wed, 15 Nov 2017 12:08:47 -0800 Subject: [PATCH] lint: fix lint errors --- deps/chakrashim/src/v8chakra.h | 19 +++++++++---------- deps/chakrashim/src/v8objecttemplate.cc | 7 +++---- test/parallel/test-require-json.js | 3 ++- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/deps/chakrashim/src/v8chakra.h b/deps/chakrashim/src/v8chakra.h index 8adc147b255..e7435229349 100644 --- a/deps/chakrashim/src/v8chakra.h +++ b/deps/chakrashim/src/v8chakra.h @@ -77,8 +77,7 @@ class ExternalData { } }; -struct SetterGetterInterceptor -{ +struct SetterGetterInterceptor { NamedPropertyGetterCallback namedPropertyGetter; NamedPropertySetterCallback namedPropertySetter; NamedPropertyQueryCallback namedPropertyQuery; @@ -96,7 +95,8 @@ struct SetterGetterInterceptor IndexedPropertyDescriptorCallback indexedPropertyDescriptor; Persistent indexedPropertyInterceptorData; - SetterGetterInterceptor(SetterGetterInterceptor * setterGetterInterceptor): + explicit SetterGetterInterceptor( + SetterGetterInterceptor * setterGetterInterceptor): namedPropertyGetter(setterGetterInterceptor->namedPropertyGetter), namedPropertySetter(setterGetterInterceptor->namedPropertySetter), namedPropertyQuery(setterGetterInterceptor->namedPropertyQuery), @@ -110,12 +110,13 @@ struct SetterGetterInterceptor indexedPropertySetter(setterGetterInterceptor->indexedPropertySetter), indexedPropertyQuery(setterGetterInterceptor->indexedPropertyQuery), indexedPropertyDeleter(setterGetterInterceptor->indexedPropertyDeleter), - indexedPropertyEnumerator(setterGetterInterceptor->indexedPropertyEnumerator), + indexedPropertyEnumerator( + setterGetterInterceptor->indexedPropertyEnumerator), indexedPropertyDefiner(setterGetterInterceptor->indexedPropertyDefiner), - indexedPropertyDescriptor(setterGetterInterceptor->indexedPropertyDescriptor), + indexedPropertyDescriptor( + setterGetterInterceptor->indexedPropertyDescriptor), indexedPropertyInterceptorData(nullptr, - setterGetterInterceptor->indexedPropertyInterceptorData) - { + setterGetterInterceptor->indexedPropertyInterceptorData) { } SetterGetterInterceptor(): @@ -132,9 +133,7 @@ struct SetterGetterInterceptor indexedPropertyDeleter(nullptr), indexedPropertyEnumerator(nullptr), indexedPropertyDefiner(nullptr), - indexedPropertyDescriptor(nullptr) - { - + indexedPropertyDescriptor(nullptr) { } }; diff --git a/deps/chakrashim/src/v8objecttemplate.cc b/deps/chakrashim/src/v8objecttemplate.cc index 8666a84a63c..278c76dbad2 100755 --- a/deps/chakrashim/src/v8objecttemplate.cc +++ b/deps/chakrashim/src/v8objecttemplate.cc @@ -63,7 +63,7 @@ class ObjectTemplateData : public TemplateData { bool AreInterceptorsRequired() { return setterGetterInterceptor != nullptr && - ( setterGetterInterceptor->namedPropertyDeleter != nullptr || + (setterGetterInterceptor->namedPropertyDeleter != nullptr || setterGetterInterceptor->namedPropertyEnumerator != nullptr || setterGetterInterceptor->namedPropertyGetter != nullptr || setterGetterInterceptor->namedPropertyQuery != nullptr || @@ -76,7 +76,7 @@ class ObjectTemplateData : public TemplateData { setterGetterInterceptor->indexedPropertyQuery != nullptr || setterGetterInterceptor->indexedPropertySetter != nullptr || setterGetterInterceptor->indexedPropertyDefiner != nullptr || - setterGetterInterceptor->indexedPropertyDescriptor != nullptr ); + setterGetterInterceptor->indexedPropertyDescriptor != nullptr); /* CHAKRA: functionCallDelegate is intentionaly not added as interceptors because it can be invoked through Object::CallAsFunction or Object::CallAsConstructor @@ -764,8 +764,7 @@ JsValueRef CHAKRA_CALLBACK Utils::DefinePropertyCallback( JsValueRef result = JS_INVALID_REFERENCE; - if (objectData->setterGetterInterceptor != nullptr) - { + if (objectData->setterGetterInterceptor != nullptr) { if (isPropIntType) { if (objectData->setterGetterInterceptor-> indexedPropertyDefiner != nullptr) { diff --git a/test/parallel/test-require-json.js b/test/parallel/test-require-json.js index e12474e6a92..a46de8f26bf 100644 --- a/test/parallel/test-require-json.js +++ b/test/parallel/test-require-json.js @@ -32,5 +32,6 @@ try { chakracore: /test[/\\]fixtures[/\\]invalid\.json: JSON\.parse Error: Expected '}'/ }); - assert.ok(re, `require() json error should include path - currently: ${err.message}`); + assert.ok(re, 'require() json error should include path - currently: ' + + err.message); }