Bug 6261 - Misc. array object fixes from KJS
Summary: Misc. array object fixes from KJS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-27 14:17 PST by Maks Orlovich
Modified: 2006-01-13 12:15 PST (History)
0 users

See Also:


Attachments
patch (3.07 KB, patch)
2005-12-27 14:18 PST, Maks Orlovich
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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