21 Commits

Author SHA1 Message Date
dbaron%dbaron.org
b5292f8c85 Add nsVoidArray::FastElementAt that requires the caller to do bounds checks (0 <= aIndex < Count()). Make ElementAt a little safer without loss of speed (back to the old safety). Make nsCOMArray<T>::ObjectAt use FastElementAt. b=96108 r=darin
git-svn-id: svn://10.0.0.236/trunk@162313 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-14 17:17:21 +00:00
timeless%mozdev.org
5a1907b913 Bug 106386 Correct misspellings in source code
Changes strings which meant "referring"
patch by ajvincent@juno.com r=timeless sr=dmose


git-svn-id: svn://10.0.0.236/trunk@149429 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 10:05:45 +00:00
sicking%bigfoot.com
baa6f09289 Bug 225507: Implement nsCOMArray::SafeObjectAt for out-of-bounds safe access.
r=bryner sr=alecf


git-svn-id: svn://10.0.0.236/trunk@149249 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-13 17:01:20 +00:00
bsmedberg%covad.net
d806a6edb3 Bug 212222 - Load default prefs from the GRE and from the application. r/sr=alecf/darin
NOTE: This is only the backend work necessary to load prefs. The actual separation of prefs into application/embedding will happen in another bug.


git-svn-id: svn://10.0.0.236/trunk@148776 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-03 16:46:13 +00:00
dbaron%dbaron.org
e2dd495447 nsCOMArray should not use nsDerivedSafe. b=221525 r=bryner
git-svn-id: svn://10.0.0.236/trunk@147720 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 23:17:58 +00:00
dougt%meer.net
b0d1d728ad add Sort() to nsCOMArray. Patch from ari the_great_spam_bin@yahoo.com. r=alecf, b=211535
git-svn-id: svn://10.0.0.236/trunk@147670 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-07 05:42:28 +00:00
neil%parkwaycc.co.uk
a8347d1ab6 Bug 198685 need nsCOMArray function like IndexOf that checks COM object identity p=bsmedberg@covad.net r=alecf (no sr needed)
git-svn-id: svn://10.0.0.236/trunk@140238 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-25 13:16:02 +00:00
sicking%bigfoot.com
736d455dc3 Bug 162115: Make nsCOMArray return nsDeriviedSafes to avoid bad addrefs/releases
r=bz sr=alecf


git-svn-id: svn://10.0.0.236/trunk@136593 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-18 14:04:23 +00:00
bzbarsky%mit.edu
9d0e916e54 Make the nsCOMArray destructor release all the objects. Bug 178813,
r=bbaetz, sr=rpotts


git-svn-id: svn://10.0.0.236/trunk@133295 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 13:34:18 +00:00
mkaply%us.ibm.com
51791385f5 #177543
r=me, sr=bz
OS/2 build bustage - add explicit casts


git-svn-id: svn://10.0.0.236/trunk@133258 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 04:48:56 +00:00
bzbarsky%mit.edu
31e4da2ff8 Add AppendObjects/InsertObjectsAt to nsCOMArray. Bug 175137,
r=timeless, sr=alecf, a=dbaron


git-svn-id: svn://10.0.0.236/trunk@132489 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-25 01:40:50 +00:00
bzbarsky%mit.edu
f8ed360af8 Make IndexOf a const method. Bug 174940, r=dougt, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@132161 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-17 19:26:27 +00:00
varga%netscape.com
f1626347cb Fix for bug 174443. nsCOMArray::ApendObject() shouldn't addref
r=dougt, sr=alecf, a=asa


git-svn-id: svn://10.0.0.236/trunk@132048 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-15 23:59:20 +00:00
bbaetz%student.usyd.edu.au
5a1dcdcdd7 Change the never-defined copy-constructor signature to refer to nsCOMArray<T>
instead of nsCOMArray. Should fix OS2 bustage, which noticed this because
it instantiates the function even when its not used
r=sicking, sr=mozbot, a=tinderbox


git-svn-id: svn://10.0.0.236/trunk@132012 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-15 05:19:30 +00:00
alecf%netscape.com
8c7efaf56b more work on bug 162115 - use "friend" to allow nsCOMArray<T>'s copy constructor to be protected, but still usable from nsArray
not part of build


git-svn-id: svn://10.0.0.236/trunk@131008 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-02 18:54:12 +00:00
alecf%netscape.com
7a97110e41 add support for a nsISimpleEnumerator implementation for nsCOMArray<T> and nsIArray, and update existing interfaces to support that:
- move nsCOMArray_base's ObjectAt/[]/Count() methods into the public so that nsCOMArrayEnumerator can get to it
- tweak NS_NewArray() to match the existing enumerator NS_New* API
- hook up NS_NewArrayEnumerator to nsArray::Enumerate
Not part of the build, for bug 162115


git-svn-id: svn://10.0.0.236/trunk@130891 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 17:34:25 +00:00
alecf%netscape.com
82affdbd0d - fix ReplaceObjectAt to properly account for existing null entries
- make nsCOMArray_base accessible from nsCOMArray<T> so that a nsCOMArray<T> can passed to NS_NewArray
for bug 162115, not part of build


git-svn-id: svn://10.0.0.236/trunk@130857 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-01 00:37:41 +00:00
alecf%netscape.com
fdfa35a2b7 not part of build, more for bug 162115:
- fix some spelling, add documentation
- add NS_NewArray(), including one that takes an existing nsCOMArray<T>
- implement copy constructor for nsCOMArray_base, so that NS_NewArray can work
not part of build


git-svn-id: svn://10.0.0.236/trunk@130839 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-30 23:02:31 +00:00
alecf%netscape.com
2c0c64385c match up some reviewers comments:
- tri-license with MPL, not NPL
- be consistent with policy on null in the array (it is allowed)
- move Clear() into implementation file, and hide static callback there too
- make sure to AddRef() on the way out of nsArray::IndexOf()
- handle failure of ReplaceElementAt more gracefully
bug 162115, not part of build yet


git-svn-id: svn://10.0.0.236/trunk@130822 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-30 22:01:46 +00:00
alecf%netscape.com
49dbdd1151 continuing work in progress on nsCOMArray<T> - take darin's suggestion and move all nsISupports-related code into a non-template base class nsCOMArray_base. This allows the generated template to be paper thin (or really, non-existent!)
Then, we move some of the non-trivial methods of this class into a .cpp file


git-svn-id: svn://10.0.0.236/trunk@130604 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 19:29:45 +00:00
alecf%netscape.com
e05f12a7a1 continue work-in-progress with freezable array.
Also introduce nsCOMArray<nsIFoo>
not part of build


git-svn-id: svn://10.0.0.236/trunk@130571 18797224-902f-48f8-a5cc-f745e15eee43
2002-09-27 06:08:49 +00:00