Bug 33947 - Object.prototype.hasOwnProperty returns the wrong result for some window properties
Summary: Object.prototype.hasOwnProperty returns the wrong result for some window prop...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Kent Hansen
URL:
Keywords:
Depends on: 33946 33948 34087
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-21 06:36 PST by Kent Hansen
Modified: 2022-07-21 17:09 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Hansen 2010-01-21 06:36:10 PST
The results aren't consistent with Object.getOwnPropertyNames; see discussion and test cases in https://bugs.webkit.org/show_bug.cgi?id=33603.

JSObject::hasOwnProperty() should use getOwnPropertyDescriptor() rather than getOwnPropertySlot(), since getOwnPropertySlot() does proxying of prototype properties; this is an implementation detail that shouldn't be exposed through public JS functions.
Comment 1 Ahmad Saleem 2022-07-21 13:30:23 PDT
All dependent bugs are fixed and Safari pass all WPT related test for this:

https://wpt.fyi/results/js/builtins?label=master&label=experimental&aligned&q=object.prototype.hasownproperty

Is something needed more here? Thanks!