node-api: fix napi_get_all_property_names use of napi_key_configurable filter
What is the issue?
Currently napi_get_all_property_names
has a bug where the napi_key_configurable
filter is used as napi_key_writable
filter. As a result, it is not possible to filter property names by napi_key_configurable
.
Since it is a rare scenario, the issue was not observed, and there were no tests for it.
The fix description
The code is fixed to use v8::PropertyFilter::ONLY_CONFIGURABLE
for the napi_key_configurable
filter instead of v8::PropertyFilter::ONLY_WRITABLE
.
New test cases were added to check this scenario.