Boris Zbarsky
880e764352
Bug 618479 part 1. Clean up the nsTArray binary-insert code a little bit. r=jlebar,kinetik
2013-02-13 10:11:53 -05:00
Jeff Walden
15f60ef632
Rename the |static const bool result| member of IsSame, IsPod, and IsPointer to |value| to be consistent with every other type trait. I have no idea how I managed to consistently not notice this during review. Followup to bug 723228, r=typo
2013-02-08 22:59:54 -08:00
Razvan Cojocaru
15c13f8d76
Bug 723228 - nsTArray::AssignRange should use memcpy when possible. r=jlebar for the XPCOM changes, r=jwalden for js/mfbt changes
...
--HG--
extra : rebase_source : 2442a0d29ae0fa7edd0312d980cbc270a4f33134
2013-02-08 13:18:49 -08:00
Justin Lebar
72d9ee54dc
Bug 819791 - Part 11: Make nsTArray and friends' copy constructors explicit. r=bz
2012-12-18 20:16:07 -05:00
Justin Lebar
7bef45ba1a
Bug 819791 - Part 3: Make typeof nsTArray == typeof InfallibleTArray. r=bz
...
Also make typeof nsAutoTArray == typeof AutoInfallibleTArray and switch
files to using nsTArrayForwardDeclare.h.
2012-12-18 20:16:06 -05:00
Justin Lebar
900c0a0310
Bug 819791 - Part 1: Remove nsTArrayDefaultAllocator, replacing it unconditionally with nsTArrayInfallibleAllocator. r=bz
2012-12-18 20:16:06 -05:00
Boris Zbarsky
b510abf604
Bug 819523 part 1. Make it possible to use the various-allocator nsTArrays interchangeably as long as you're working with const objects. r=jlebar
2012-12-18 20:16:05 -05:00
Boris Zbarsky
231fb39036
Bug 815671 part 10. Make nsTArray constructors explicit. r=jlebar
2012-11-29 11:14:14 -05:00
Benoit Jacob
4a50000d0e
Bug 806279 - CC macros refactoring: part 1: implement type-generic CC UNLINK/TRAVERSE macros - r=mccr8,smaug
2012-11-15 02:32:39 -05:00
William Chen
e95607fd91
Bug 798065 - Fix integer underflow in nsTArray::LastIndexOf. r=cjones
2012-10-04 15:23:41 -07:00
Nathan Froyd
5f8f36ca5f
Bug 796119 - part 2: don't #include prtypes.h in xpcom/ unless absolutely necessary; r=ehsan
...
"absolutely necessary" in this context means "needs PRUnichar", which is
the reason that nsString.h now #includes prtypes.h.
2012-10-01 17:01:01 -04:00
Nathan Froyd
ec0cae57b0
Bug 796279 - remove remaining PR_MAX instances from the tree; r=ehsan
...
We can't use NS_MAX or std::max because we lack uniform constexpr
support across our supported compilers. But we can do a simple inline
max ourselves.
2012-10-01 20:38:21 -04:00
Ehsan Akhgari
bdd40e5c18
Backout changeset 9e38c5518605, fc59bd8d49ba, d0ba1abde985, and acf91f25f228 (bugs 796119, 796279, and 797106) because of broken reftests on 64-bit platforms
2012-10-02 23:16:36 -04:00
Nathan Froyd
d66cf7dc03
Bug 796119 - part 2: don't #include prtypes.h in xpcom/ unless absolutely necessary; r=ehsan
...
"absolutely necessary" in this context means "needs PRUnichar", which is
the reason that nsString.h now #includes prtypes.h.
2012-10-01 17:01:01 -04:00
Nathan Froyd
45f0148efe
Bug 796279 - remove remaining PR_MAX instances from the tree; r=ehsan
...
We can't use NS_MAX or std::max because we lack uniform constexpr
support across our supported compilers. But we can do a simple inline
max ourselves.
2012-10-01 20:38:21 -04:00
Boris Zbarsky
b1cf9cb142
Bug 793253. Infallible TArrays should really be infallible. r=jlebar
2012-09-22 22:04:54 -04:00
Ehsan Akhgari
0fd9123eac
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
e806eeab4f
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Joshua Cranmer
4b8f318e78
Bug 773637 - Kill NS_SCRIPTABLE annotations, Part 1: Remove NS_*PARAM annotations. r=ehsan
...
--HG--
extra : rebase_source : a0b4bc50fece36d9a90fed61431635948bfa33b5
2012-07-06 15:14:07 -05:00
Aryeh Gregor
fd7f652fe8
Bug 771873 part 2 - Assert on addition overflow in nsTArray::RemoveElementsAt; r=bsmedberg
2012-07-09 11:13:23 +03:00
Jim Mathies
e13dc80985
Bug 761279 - Temporary work around for a VS 2012 RC compiler crash in nsTArray's Init. r=bsmedberg
2012-06-13 08:37:24 -05:00
Cameron McCormack
dc816782b7
Fix a couple of typos in comments. No bug, no review.
2012-05-31 10:32:17 +10:00
Gervase Markham
ca171eec44
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Cameron McCormack
4d99616f04
Bug 739129 - Add LastElement and SafeLastElement functions to nsTArray. r=dbaron
2012-03-27 09:48:25 +11:00
Chris Lord
3b90179676
Bug 738740 - Fix handling of parameters in nsTArray::ReplaceElementAt. r=bz
...
Handle the parameters given to ReplaceElementAt the same way as those given to
other methods in the class. This allows removal of the & in GLContext.cpp that
was taking the address of a temporary, and causing a build error when using
clang, or when using GCC with particular parameters.
2012-03-23 19:27:25 +00:00
Matias Juntunen
4147eeb698
Bug 617947 - Merge 'class nsQuickSortComparator' into 'nsTArray'. r=bsmedberg
2012-03-21 19:52:24 -04:00
Jesse Ruderman
2fba78bac9
Bug 732607 - make nsTArray assertions fatal. r=bz
2012-03-03 13:16:13 -08:00
Justin Lebar
71326e2f8d
Bug 719531 - Part 2: Make FallibleTArray use moz_malloc rather than NS_Alloc, because only the former is fallible. r=bsmedberg
...
--HG--
extra : rebase_source : 9259871f86b6fcaa805b0e042c52e10b751acdf5
2012-01-26 12:51:45 -05:00
Nicholas Nethercote
a7ad4ef70e
Bug 715453 - Remove computedSize from nsMallocSizeOfFun. r=jlebar,bhackett.
...
--HG--
extra : rebase_source : a65039a407daab45360a5b375b53cbf1bc05b7f6
2012-01-25 00:52:51 -08:00
Jeff Walden
9110dc5c3b
Bug 712129 - Implement MOZ_STATIC_ASSERT and MOZ_STATIC_ASSERT_IF. r=luke
2011-12-19 16:58:30 -05:00
Nicholas Nethercote
8f335f567c
Bug 707865 - Convert nsTArray::SizeOf() to nsTArray::SizeOfExcludingThis(). r=jlebar.
...
--HG--
extra : rebase_source : d802d58bc7dedda2490878793923adc0ab55f779
2011-12-15 14:59:53 -08:00
Justin Lebar
adfe8317b6
Bug 701210 - nsTArray::SizeOf() should use malloc_usable_size. r=roc
2011-11-09 20:40:09 -05:00
Boris Zbarsky
2872bb50f3
Bug 697917. Avoid atomizing the token for nsDOMTokenList containment tests. r=smaug
2011-10-28 13:06:39 -04:00
Boris Zbarsky
d9a272bc06
Bug 696195. Add single-argument SafeElementAt specializations for nsTArrays of smart pointers. r=jlebar
2011-10-25 12:58:01 -04:00
Ehsan Akhgari
2a602a5685
Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
...
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Jonathan Kew
36c1dc9fbe
bug 671297 - add memory reporting for textRuns. r=roc,jlebar
2011-10-14 08:06:35 +01:00
Ehsan Akhgari
a1ace9621b
Bug 692782 - Bug 690670 broke clang builds; r=cjones
2011-10-07 15:31:12 -04:00
Justin Lebar
83e3821db7
Bug 689433 - Align nsAutoTArray<E> to E's natural alignment. r=roc
...
--HG--
extra : rebase_source : f7062f251f6905a58145ed6d94680f076dabbef7
2011-10-05 09:11:17 -04:00
Chris Jones
9928eba1eb
Bug 690670, part 0: Add helpers for copy-constructing auto arrays from regular arrays. r=roc
...
--HG--
extra : rebase_source : e586553e4a2cf344f72347e195f42762f0183c99
2011-10-05 15:15:45 -07:00
Michael Wu
d8e503c38b
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
...
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Justin Lebar
a55182fa93
Bug 687722 - Make swapping two nsAutoTArrays preserve their auto-ness when possible. r=roc
2011-09-22 11:22:20 -04:00
Atul Aggarwal
89e9702d5f
Bug 685905 - Adding ReplaceElementAt to nsTArray. r=sicking
2011-09-20 21:04:35 +05:30
Justin Lebar
087ea9e1a0
Bug 686597 - Add a copy constructor to nsAutoTArray and friends. r=bz
2011-09-15 22:16:14 -07:00
Ehsan Akhgari
e48161b8ff
Bug 677661 - Remove nsTPtrArray and add a SafeElementAt(index_type) API to nsTArray when it's instantiated with a pointer type; r=sicking
2011-08-10 01:36:00 -04:00
Kyle Huey
ea6fb77663
Bug 674284: Add nsTArray::SizeOf. r=bsmedberg
2011-08-01 14:37:00 -04:00
Kyle Huey
edfd32c652
Backed out changeset 030c419226ed
2011-08-01 08:26:15 -04:00
Kyle Huey
812161b9e1
Bug 674284: Add nsTArray::SizeOf. r=bsmedberg
2011-08-01 08:11:26 -04:00
Dominic Fandrey
0ab2f46136
Bug 645398 - Substitute PR_(MAX|MIN|ABS|ROUNDUP) macro calls; r=roc
2011-06-02 14:56:50 +02:00
Gavin Sharp
e9ac5d6a43
Fix comment typo per bug 550611 comment 34
2011-03-30 15:55:00 -04:00
Rafael Ávila de Espíndola
f73cc161b4
Bug 622142 - nsTArray class depends on invalid unqualified lookup into dependent bases of class templates; r,a=bsmedberg
2011-01-12 16:37:20 -05:00