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

Commit

Permalink
lint: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhorton committed Nov 15, 2017
1 parent 1749b7c commit 00702bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
19 changes: 9 additions & 10 deletions deps/chakrashim/src/v8chakra.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ class ExternalData {
}
};

struct SetterGetterInterceptor
{
struct SetterGetterInterceptor {
NamedPropertyGetterCallback namedPropertyGetter;
NamedPropertySetterCallback namedPropertySetter;
NamedPropertyQueryCallback namedPropertyQuery;
Expand All @@ -96,7 +95,8 @@ struct SetterGetterInterceptor
IndexedPropertyDescriptorCallback indexedPropertyDescriptor;
Persistent<Value> indexedPropertyInterceptorData;

SetterGetterInterceptor(SetterGetterInterceptor * setterGetterInterceptor):
explicit SetterGetterInterceptor(
SetterGetterInterceptor * setterGetterInterceptor):
namedPropertyGetter(setterGetterInterceptor->namedPropertyGetter),
namedPropertySetter(setterGetterInterceptor->namedPropertySetter),
namedPropertyQuery(setterGetterInterceptor->namedPropertyQuery),
Expand All @@ -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():
Expand All @@ -132,9 +133,7 @@ struct SetterGetterInterceptor
indexedPropertyDeleter(nullptr),
indexedPropertyEnumerator(nullptr),
indexedPropertyDefiner(nullptr),
indexedPropertyDescriptor(nullptr)
{

indexedPropertyDescriptor(nullptr) {
}
};

Expand Down
7 changes: 3 additions & 4 deletions deps/chakrashim/src/v8objecttemplate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand All @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-require-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 00702bb

Please sign in to comment.