[Webkit-unassigned] [Bug 32242] implement Object.getOwnPropertyNames()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 15 11:48:05 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32242





--- Comment #3 from Patrick Mueller <pmuellr at yahoo.com>  2009-12-15 11:48:05 PST ---
doing a global search across WebKit for getOwnPropertyNames() methods yields
multiple hits.  It's unclear to me at the moment how many of these are genned,
and how many are written by hand.  I'm guessing that there are implementations
of visible objects, specifically, what fast/js/global-constructors actually
finds, which are auto-genned, and there are glue-y bits which are hand built.  

The search did get a hit on WebCore/bindings/scripts/CodeGeneratorJS.pm which
is a generator, which would presumably work for the auto-genned classes.

It's not clear to me that there is a less intrusive fix here.  The problem is
that any object, including host ones, can presumably have non-enumerable
properties, so there has to be a way to get these.  On the other hand,
retrieving non-enumerable properties is going to be something done almost none
of the time, compared with retrieving the enumerable properties, so we don't
want to, for instance, always have the most inner most calls returning
non-enumerable properties then filtering them somehow later (not sure how that
would even be done).

It might be the case that we could assume that host objects never have
non-enumerable properties, and then just provide the capability of getting the
own, non-enumerated properties to non-host objects.  Not quite sure how this
would work either, but is potentially an interesting solution (affects less
code, no performance impacts, etc).

In any case, so I'm going to stop looking into this one:

- perhaps there is a simpler way to do this that doesn't hit so many files, but
I don't know what it is

- the fix requires hits to so many files that I'm hesitant to make the change
myself given my lack of experience with JSC

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list