Bug 6261

Summary: Misc. array object fixes from KJS
Product: WebKit Reporter: Maks Orlovich <maksim>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
patch mjs: review+

Description Maks Orlovich 2005-12-27 14:17:40 PST
Fixes:  
1. Make sure that accesses to arrays with index 2^32-1 via the int path does  
not screw things up. 2^32-1 is never a real array index property. (Kind of 
icky, I agree) 
2. Throw exception on trying to set invalid array length  
(As per 15.4.5.1, steps 12 and 13)  
3. Do not use a separator argument when doing toString/toLocalString  
  
  
Mostly merging work by Peter Kelly  
#1 and #2 are covered by KJS testcases.  
For #3:  
  
var a = new Array;  
a[0] = 5;  
a[1] = 3;  
//Shouldn't use argument for toString  
shouldBe("a.toString('!')", "'5,3'");
Comment 1 Maks Orlovich 2005-12-27 14:18:04 PST
Created attachment 5311 [details]
patch
Comment 2 Maciej Stachowiak 2005-12-29 00:27:12 PST
Comment on attachment 5311 [details]
patch

r=me, the ad-hoc test for toString needs to be converted to a proper layout
test.
Comment 3 Maciej Stachowiak 2005-12-29 01:16:57 PST
Comment on attachment 5311 [details]
patch

r=me