Bug 33947
Summary: | Object.prototype.hasOwnProperty returns the wrong result for some window properties | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kent Hansen <kent.hansen> |
Component: | JavaScriptCore | Assignee: | Kent Hansen <kent.hansen> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 | ||
Bug Depends on: | 33946, 33948, 34087 | ||
Bug Blocks: |
Kent Hansen
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
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!