Simon Giesecke
96f3e7e019
Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli
381fca9783
Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
...
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke
032d2ac9d3
Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Simon Giesecke
9cc891f41f
Bug 1628715 - Part 5: Add MOZ_NONNULL_RETURN to infallible nsTArray::InsertElementsAt. r=xpcom-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D70403
2020-04-24 13:26:13 +00:00
Nicholas Nethercote
af281df032
Bug 1587176
- Fix UBSAN complaints about nsCOMArray. r=erahm
...
nsCOMArray currently casts a function that takes two `void` pointers into a
function that takes two `nsISupports` pointers. UBSAN doesn't like this.
This commit introduces an extra level of casting machinery. As a result, each
comparison done while sorting goes through an extra level, to get from `(T*,
T*)` comparisons to `(nsISupports*, nsISupports*)` comparisons to `(void*,
void*)` comparisons, as required by `NS_QuickSort()`. It's a bit annoying but I
can't see how else to solve this within the constraint imposed by the existing
`nsCOMArray_base`/`nsCOMArray` split.
Differential Revision: https://phabricator.services.mozilla.com/D51223
--HG--
extra : moz-landing-system : lando
2019-11-05 00:14:10 +00:00
Nicholas Nethercote
aa1586413a
Bug 1587176
- Rename some nsCOMArray internal stuff. r=erahm
...
This makes the subsequent commit easier to understand.
Differential Revision: https://phabricator.services.mozilla.com/D51222
--HG--
extra : moz-landing-system : lando
2019-11-05 00:12:06 +00:00
Sylvestre Ledru
f12b9fa5c3
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D47737
--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Nathan Froyd
f21661fdf8
Bug 1571759 - add nsTArray::EmplaceBack; r=erahm
...
Much preferred to `AppendElement(T(...))`.
Differential Revision: https://phabricator.services.mozilla.com/D42024
--HG--
extra : moz-landing-system : lando
2019-08-16 00:18:57 +00:00
Boris Zbarsky
cbf64dc6ab
Bug 1551782. Remove now-unused nsCOMArray::Forget and nsCOMArray::Adopt methods. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D31246
--HG--
extra : moz-landing-system : lando
2019-05-16 15:13:44 +00:00
Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Mike Hommey
404ef7af3e
Bug 1407838 - Remove the remains of NS_Alloc/NS_Realloc/NS_Free. r=njn
...
Bug 1134923 removed the use of those functions in gecko, and left some
for the XPCOM standalone glue. The XPCOM standalone glue was severely
stripped down in bug 1306327, with the effect of removing the
implementation for those functions.
The remains in nsXPCOM.h are:
XPCOM_API(void*) NS_Alloc(size_t aSize);
XPCOM_API(void*) NS_Realloc(void* aPtr, size_t aSize);
XPCOM_API(void) NS_Free(void* aPtr);
With no implementation left, the first arm is never actually used, and
the second arm means every remaining use of those functions in the tree
is a macro expansion to one of moz_xmalloc, moz_xrealloc or free.
--HG--
extra : rebase_source : fd1669abc5a25d8edbd5c3a8522e22a5c3f558e2
2017-10-12 11:08:44 +09:00
Philippe Normand
e22abc7e90
Bug 1404302 - Include nsQuickSort.h in nsCOMArray.cpp. r=froydnj
...
This fixes the build in non-unified mode, as nsCOMArray::Sort() method uses
NS_QuickSort().
MozReview-Commit-ID: CDBLIX8D3mL
--HG--
extra : rebase_source : 67902cf10b9311adbd97fecf7906762bb86c52e4
2017-09-28 14:30:29 +01:00
Benjamin Smedberg
2b3617b084
Bug 1332631 part C - file moves from xpcom/glue to xpcom/ds, r=froydnj
...
MozReview-Commit-ID: 9ZhC5bROWdO
--HG--
rename : xpcom/glue/Observer.h => xpcom/ds/Observer.h
rename : xpcom/glue/PLDHashTable.cpp => xpcom/ds/PLDHashTable.cpp
rename : xpcom/glue/PLDHashTable.h => xpcom/ds/PLDHashTable.h
rename : xpcom/glue/nsArrayEnumerator.cpp => xpcom/ds/nsArrayEnumerator.cpp
rename : xpcom/glue/nsArrayEnumerator.h => xpcom/ds/nsArrayEnumerator.h
rename : xpcom/glue/nsArrayUtils.cpp => xpcom/ds/nsArrayUtils.cpp
rename : xpcom/glue/nsArrayUtils.h => xpcom/ds/nsArrayUtils.h
rename : xpcom/glue/nsBaseHashtable.h => xpcom/ds/nsBaseHashtable.h
rename : xpcom/glue/nsCOMArray.cpp => xpcom/ds/nsCOMArray.cpp
rename : xpcom/glue/nsCOMArray.h => xpcom/ds/nsCOMArray.h
rename : xpcom/glue/nsClassHashtable.h => xpcom/ds/nsClassHashtable.h
rename : xpcom/glue/nsDataHashtable.h => xpcom/ds/nsDataHashtable.h
rename : xpcom/glue/nsDeque.cpp => xpcom/ds/nsDeque.cpp
rename : xpcom/glue/nsDeque.h => xpcom/ds/nsDeque.h
rename : xpcom/glue/nsEnumeratorUtils.cpp => xpcom/ds/nsEnumeratorUtils.cpp
rename : xpcom/glue/nsEnumeratorUtils.h => xpcom/ds/nsEnumeratorUtils.h
rename : xpcom/glue/nsHashKeys.h => xpcom/ds/nsHashKeys.h
rename : xpcom/glue/nsInterfaceHashtable.h => xpcom/ds/nsInterfaceHashtable.h
rename : xpcom/glue/nsJSThingHashtable.h => xpcom/ds/nsJSThingHashtable.h
rename : xpcom/glue/nsPointerHashKeys.h => xpcom/ds/nsPointerHashKeys.h
rename : xpcom/glue/nsQuickSort.cpp => xpcom/ds/nsQuickSort.cpp
rename : xpcom/glue/nsQuickSort.h => xpcom/ds/nsQuickSort.h
rename : xpcom/glue/nsRefPtrHashtable.h => xpcom/ds/nsRefPtrHashtable.h
rename : xpcom/glue/nsTArray-inl.h => xpcom/ds/nsTArray-inl.h
rename : xpcom/glue/nsTArray.cpp => xpcom/ds/nsTArray.cpp
rename : xpcom/glue/nsTArray.h => xpcom/ds/nsTArray.h
rename : xpcom/glue/nsTArrayForwardDeclare.h => xpcom/ds/nsTArrayForwardDeclare.h
rename : xpcom/glue/nsTHashtable.h => xpcom/ds/nsTHashtable.h
rename : xpcom/glue/nsTObserverArray.cpp => xpcom/ds/nsTObserverArray.cpp
rename : xpcom/glue/nsTObserverArray.h => xpcom/ds/nsTObserverArray.h
rename : xpcom/glue/nsTPriorityQueue.h => xpcom/ds/nsTPriorityQueue.h
extra : rebase_source : 5f0638e3268acb932e1a8d3f499d283bc1922acd
extra : histedit_source : dcea9485885877bb02f95a1ecc627465a507f757
2017-01-20 13:59:21 -05:00
bsmedberg%covad.net
7112d805ca
Bug 289010 - Move nsVoidArray/nsCOMArray to the XPCOM glue, and a few other things to make the glue easier to use, r=shaver+darin . The following files were CVS-copied from xpcom/ds to xpcom/glue: nsVoidArray.h nsVoidArray.cpp nsCOMArray.h nsCOMArray.cpp nsQuickSort.h nsQuickSort.cpp
2005-11-02 20:39:39 +00:00
bzbarsky%mit.edu
608e73b236
nsCOMArray::RemoveObjectAt fails to remove nulls correctly. Bug 265772,
...
r=darin, sr=dbaron
2004-10-24 17:24:25 +00:00
bzbarsky%mit.edu
7d1f0c7ed2
Make ReplaceObjectAt a little safer. Bug 227780, r=timeless, sr=alecf
2004-01-05 23:43:28 +00:00
dbaron%dbaron.org
3ca027dcc3
nsCOMArray should not use nsDerivedSafe. b=221525 r=bryner
2003-10-07 23:17:58 +00:00
neil%parkwaycc.co.uk
25738e0473
Bug 198685 need nsCOMArray function like IndexOf that checks COM object identity p=bsmedberg@covad.net r=alecf (no sr needed)
2003-03-25 13:16:02 +00:00
bzbarsky%mit.edu
95563f3ca8
fix build bustage
2003-03-20 03:40:26 +00:00
alecf%netscape.com
799163824a
fix an assertion from nsCOMArray where ReplaceElementAt() wouldn't property extend the array because we were just using ObjectAt()
...
residual stuff from bug 197827, which caused an assertion browsing frame
patch by keeda@hotpop.com , r/sr=alecf
2003-03-20 02:34:11 +00:00
sicking%bigfoot.com
5ff462a000
Bug 162115: Make nsCOMArray return nsDeriviedSafes to avoid bad addrefs/releases
...
r=bz sr=alecf
2003-01-18 14:04:23 +00:00
bzbarsky%mit.edu
7e9b235805
Make the nsCOMArray destructor release all the objects. Bug 178813,
...
r=bbaetz, sr=rpotts
2002-11-07 13:34:18 +00:00
bzbarsky%mit.edu
a072d304e2
nsCOMArray_base copy constructor should not assert. Bug 178534,
...
r=dougt, sr=alecf
2002-11-06 02:00:50 +00:00
bzbarsky%mit.edu
e1ecd5f25d
Add AppendObjects/InsertObjectsAt to nsCOMArray. Bug 175137,
...
r=timeless, sr=alecf, a=dbaron
2002-10-25 01:40:50 +00:00
varga%netscape.com
54b5577b97
Fix for bug 174443. nsCOMArray::ApendObject() shouldn't addref
...
r=dougt, sr=alecf, a=asa
2002-10-15 23:59:20 +00:00
mkaply%us.ibm.com
fb84d9cdf4
OS/2 bustage - need PR_CALLBACK
2002-10-07 21:32:37 +00:00
alecf%netscape.com
7c8eb9e9d2
- 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
2002-10-01 00:37:41 +00:00
alecf%netscape.com
950bb44445
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
2002-09-30 23:02:31 +00:00
alecf%netscape.com
4b31552c74
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
2002-09-30 22:01:46 +00:00
alecf%netscape.com
8d1e0ebc54
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
2002-09-27 19:29:45 +00:00