• adamk@chromium.org's avatar
    Fix %GetArrayKeys to not skip non-enumerable indices · 9bebd23d
    adamk@chromium.org authored
    This is one step in the direction of fixing a range of small bugs in the array methods when dealing with non-standard element attributes.
    
    Added tests exercising this behavior for shift and unshift.
    
    For Proxies and Interceptors, the behavior of %GetArrayKeys is now to just return an interval, rather than trying to list all their indexed properties. In the Proxy case, this seems like the only way to avoid an observable difference between smart and non-smart array methods. For Interceptors, the usual case (in WebKit, anyway) is for them to have all indices in [0, length), so enumerating them won't be any better than simply iterating over that range.
    
    Review URL: https://codereview.chromium.org/12653010
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    9bebd23d
array-unshift.js 6.85 KB