Bug 12859 - BackForwardList of capacity 1 has unlimited size
Summary: BackForwardList of capacity 1 has unlimited size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: 420+
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-22 15:02 PST by Dex Deacon
Modified: 2007-02-27 10:58 PST (History)
0 users

See Also:


Attachments
add a check for when capacity==1 (1.19 KB, patch)
2007-02-22 15:04 PST, Dex Deacon
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dex Deacon 2007-02-22 15:02:33 PST
BackForwardList::addItem does not remove an entry if it is the current entry, so a capacity 1 list will grow forever.
Comment 1 Dex Deacon 2007-02-22 15:04:03 PST
Created attachment 13330 [details]
add a check for when capacity==1
Comment 2 Darin Adler 2007-02-22 15:35:59 PST
Comment on attachment 13330 [details]
add a check for when capacity==1

Please don't use tabs in your patches. If you do, we can't land them!

It seems that with this fix, the "not using it" concept goes away entirely for capacity-1 lists. I guess that's OK.

r=me
Comment 3 Alexey Proskuryakov 2007-02-27 10:58:25 PST
Committed revision 19889.