Bug 80921 - [JSC] Object.hasOwnProperty errors with Window object
Summary: [JSC] Object.hasOwnProperty errors with Window object
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 18:21 PDT by Gavin Barraclough
Modified: 2012-03-13 11:08 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2012-03-12 18:21:41 PDT
JSDOMWindow::getOwnPropertySlot erroneously searches the prototype chain, which it shouldn't be doing for an 'own' access.  'hasOwnProperty' is implemented in terms of getOwnPropertySlot, so this can result in incorrect results (if you create a property 'foo' on the Window object's prototype, hasOwnProperty for 'foo' on the Window object will return true).

Our behavior here is likely related to the sadness that is bug#49739.