@@ -2053,38 +2053,39 @@ napi_status napi_instanceof(napi_env e,
2053
2053
return napi_set_last_error (napi_function_expected);
2054
2054
}
2055
2055
2056
- napi_value value, jsRes ;
2056
+ napi_value value, js_result ;
2057
2057
napi_status status;
2058
- napi_valuetype valueType ;
2058
+ napi_valuetype value_type ;
2059
2059
2060
2060
// Get "Symbol" from the global object
2061
2061
status = napi_get_global (e, &value);
2062
2062
if (status != napi_ok) return status;
2063
2063
status = napi_get_named_property (e, value, " Symbol" , &value);
2064
2064
if (status != napi_ok) return status;
2065
- status = napi_get_type_of_value (e, value, &valueType );
2065
+ status = napi_get_type_of_value (e, value, &value_type );
2066
2066
if (status != napi_ok) return status;
2067
2067
2068
2068
// Get "hasInstance" from Symbol
2069
- if (valueType == napi_function) {
2069
+ if (value_type == napi_function) {
2070
2070
status = napi_get_named_property (e, value, " hasInstance" , &value);
2071
2071
if (status != napi_ok) return status;
2072
- status = napi_get_type_of_value (e, value, &valueType );
2072
+ status = napi_get_type_of_value (e, value, &value_type );
2073
2073
if (status != napi_ok) return status;
2074
2074
2075
2075
// Retrieve the function at the Symbol(hasInstance) key of the constructor
2076
- if (valueType == napi_symbol) {
2076
+ if (value_type == napi_symbol) {
2077
2077
status = napi_get_property (e, constructor, value, &value);
2078
2078
if (status != napi_ok) return status;
2079
- status = napi_get_type_of_value (e, value, &valueType );
2079
+ status = napi_get_type_of_value (e, value, &value_type );
2080
2080
if (status != napi_ok) return status;
2081
2081
2082
2082
// Call the function to determine whether the object is an instance of the
2083
2083
// constructor
2084
- if (valueType == napi_function) {
2085
- status = napi_call_function (e, constructor, value, 1 , &object, &jsRes);
2084
+ if (value_type == napi_function) {
2085
+ status = napi_call_function (e, constructor, value, 1 , &object,
2086
+ &js_result);
2086
2087
if (status != napi_ok) return status;
2087
- return napi_get_value_bool (e, jsRes , result);
2088
+ return napi_get_value_bool (e, js_result , result);
2088
2089
}
2089
2090
}
2090
2091
}
0 commit comments