https://codereview.chromium.org/116533003/diff/40001/src/runtime.cc
File src/runtime.cc (right):
https://codereview.chromium.org/116533003/diff/40001/src/runtime.cc#newcode5749
src/runtime.cc:5749: !IsInheritedApiFunctionOf(obj, proto)) {
On 2013/12/19 19:46:12, dcarney wrote:
filtering here is problematic as there could be properties higher up
the chain
that should be included or even properties set on this proto that
should be
included
you need to do the full chain walk here and filter correctly in
Runtime_GetLocalPropertyNames by not inserting duplicate names into
the list.
It'll be expensive, but you only need to pay the cost for objects with
hidden
prototype links, which are rare.
Thanks, the initial version wasn't general enough nor complete. As you
suggest, I've switched to explicitly removing duplicates instead.
Spotting those dupes isn't without cost, but if we assume them being
rare, perhaps acceptable?
https://codereview.chromium.org/116533003/diff/40001/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):
https://codereview.chromium.org/116533003/diff/40001/test/cctest/test-api.cc#newcode10040
test/cctest/test-api.cc:10040: ExpectInt32("names.length", 4);
On 2013/12/19 19:46:12, dcarney wrote:
'names' should include 'n1' and 'n2' as they are in the hidden
prototype chain
only 'foo', 'bar', and 'bas' should be filtered
Eh, right :) Thanks, updated the pass conditions accordingly.
https://codereview.chromium.org/116533003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.