Bug 120052 - Remove custom getOwnPropertyDescriptor for JSProxy
Summary: Remove custom getOwnPropertyDescriptor for JSProxy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-19 23:46 PDT by Gavin Barraclough
Modified: 2013-08-20 10:05 PDT (History)
2 users (show)

See Also:


Attachments
Fix (3.08 KB, patch)
2013-08-19 23:51 PDT, Gavin Barraclough
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2013-08-19 23:46:36 PDT
GET_OWN_PROPERTY_DESCRIPTOR_IMPL runs afoul with JSProxy due to the workaround for JSDOMWindow's broken behavior. Because the window object incorrectly searches the prototype chain in getOwnPropertySlot we check that the base object matches, but in the case of JSProxy we can end up comparing the window object to the window shell & falsely assuming this is a prototype property.  Add toThis conversion to correctly identify proxied own access. I've kept the original slotBase check as a fast case, and also so that direct access on JSDOMWindow still works.
Comment 1 Gavin Barraclough 2013-08-19 23:51:04 PDT
Created attachment 209162 [details]
Fix
Comment 2 Geoffrey Garen 2013-08-20 09:37:53 PDT
Comment on attachment 209162 [details]
Fix

r=me
Comment 3 Gavin Barraclough 2013-08-20 10:05:59 PDT
Committed revision 154334.