Since
37f1f20de909, njs_object_hash_test() requires lhq->key.start
to be NULL to avoid hash collisions.
The field is zeroed by njs_property_query_init(), but the field still
might be non-zero when njs_property_query() is called inside a loop.
The fix is to ensure lhq->key.start == NULL for symbol keys.
This closes #268 issue on Github.
if (njs_is_symbol(key)) {
pq->lhq.key_hash = njs_symbol_key(key);
+ pq->lhq.key.start = NULL;
} else {
njs_string_get(&pq->key, &pq->lhq.key);
"[m.hasOwnProperty('abs'), delete m.abs, m.abs(-1)]"),
njs_str("true,true,1") },
+ { njs_str("var Q = Object.create({}, {a: {value: 'AAA'}, [Symbol.toStringTag]:{value: 'TAG'}});"
+ "Q[Symbol.toStringTag]"),
+ njs_str("TAG") },
+
{ njs_str("Object.getOwnPropertyDescriptor({a:1}, 'a').value"),
njs_str("1") },