[webkit-reviews] review requested: [Bug 33603] Some window properties are not returned by Object.keys and Object.getOwnPropertyNames : [Attachment 46914] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 19 08:38:16 PST 2010


Kent Hansen <kent.hansen at nokia.com> has asked  for review:
Bug 33603: Some window properties are not returned by Object.keys and
Object.getOwnPropertyNames
https://bugs.webkit.org/show_bug.cgi?id=33603

Attachment 46914: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=46914&action=review

------- Additional Comments from Kent Hansen <kent.hansen at nokia.com>
Make getOwnPropertyNames() more consistent with getOwnPropertyDescriptor().

I'm not sure if it would rather make sense to change the
JSDOMWindow::getOwnPropertyDescriptor() implementation to not look in the
prototype, and then change JSObject::hasOwnProperty() to call
getOwnPropertyDescriptor(). It's fine that getOwnPropertySlot() does the
proxying when actually accessing the property (since that shouldn't be
observable from the outside), but should getOwnPropertyDescriptor() really do
it as well? It does feel a bit odd that e.g.
window.hasOwnProperty("__defineGetter__") returns true.


More information about the webkit-reviews mailing list