Nicholas Nethercote
f971ca6c30
Bug 1181445 (part 1) - Implement iterators for nsTHashtable and nsBaseHashtable. r=froydnj.
...
nsBaseHashtable has both EnumerateRead() and Enumerate(). A comment claims that
the latter locks the table, but this is false, so I removed the comment. Other
than that the only notable difference between them is that they have slightly
different types for dealing with values (|UserDataType| vs |DataType&|) so I've
implemented both GetUserData() and GetData(), allowing either type to be used.
2015-07-07 20:47:59 -07:00
Nicholas Nethercote
8976e2b967
Bug 1179071 - Merge RemovingIterator into Iterator. r=froydnj.
...
The original motivation for the Iterator/RemovingIterator split was that
PLDHashTable Checker class would treat them differently. But that didn't end up
happening (see bug 1131308). So this patch merges them. This is a small code
size win now but it will become bigger when I add iterators to nsTHashTable and
nsBaseHashtable.
The only complication is that PLDHashTable::Iter() is now non-const, which is
a problem if you use it in a const method. So I added PLDHashTable::ConstIter()
which is used in just two places. It's a bit of a hack -- effectively a
const_cast -- but I don't think it's too bad.
2015-07-06 22:02:26 -07:00
Nicholas Nethercote
57fcef935f
Bug 1176163 - Remove remaining uses of PL_DHashTableEnumerate() from xpcom/. r=froydnj.
2015-06-18 18:09:37 -07:00
Nicholas Nethercote
920bcd7199
Bug 1170416 (part 5) - Remove PLDHashTable::IsInitialized(). r=froydnj.
...
|mOps| is always non-null now, and there's no longer any distinction between
and uninitialized and initialized table. Yay.
2015-05-20 21:23:55 -07:00
Nicholas Nethercote
f5e23a7693
Bug 1170416 (part 4) - Remove some unnecessary casts. r=froydnj.
2015-05-20 21:16:59 -07:00
Nicholas Nethercote
77d945d9b4
Bug 1168027 - Use PLDHashTable2 in nsTHashtable. r=froydnj.
...
The added static_casts will be removed when PLDHashTable and PLDHashTable2 are
merged.
2015-05-12 17:33:49 -07:00
Nathan Froyd
c177c1e131
Bug 1159306 - explicitly initialize nsBaseHashtableET::mData; r=erahm
...
mData will get automatically constructed when DataType is a class or
struct with a default constructor, but a number of uses of
nsBaseHashtable use integer or pointer types as DataType. Explicitly
initialize mData so that it looks as though we're fully initializing the
class in such cases.
2015-04-28 12:12:36 -04:00
Jim Blandy
2bb4503427
Bug 1145051: Use MOZ_WARN_UNUSED_RESULT instead of NS_WARN_UNUSED_RESULT. r=glandium
2015-03-19 00:46:40 -07:00
Mike Hommey
715db83e04
Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
2015-02-02 09:56:13 +09:00
Nicholas Nethercote
4604f714c6
Bug 1123151 (part 2) - Add PLDHashTable::IsInitialized(). r=froydnj.
...
This encapsulates most of the uses of PLDHashTable::ops.
2015-01-19 16:11:34 -08:00
Nicholas Nethercote
c9cbbdc34d
Bug 1057912 - Privatize most of PLDHashTable's fields. r=roc.
2014-08-25 16:56:33 -07:00
Nicholas Nethercote
fce0964f2d
Bug 1057928 (part 2) - In nsTHashtable, use |ops| instead of |entrySize| to indicate table liveness. r=dbaron.
2014-08-25 00:32:24 -07:00
Birunthan Mohanathas
da27cbd66f
Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj
2014-08-25 12:17:24 -07:00
Nicholas Nethercote
663b82ea3b
Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
...
* * *
imported patch rm-dummy-params
2014-08-06 06:31:21 -07:00
Ehsan Akhgari
c60f82c778
Bug 1045065 - Fix some bad implicit constructors in xpcom; r=froydnj
2014-07-28 13:19:06 -04:00
Birunthan Mohanathas
8a4a4c8465
Bug 1022456 - Fix modelines in xpcom/{base,glue,io,string,threads}/. r=froydnj
2014-06-30 08:39:45 -07:00
Birunthan Mohanathas
ce774b1fa6
Bug 1022456 - Convert xpcom/glue/ to Gecko style. r=froydnj
2014-06-26 18:35:39 -07:00
Ben Turner
dfafdb3c03
Bug 987285 - 'Let nsBaseHashtable and subclasses call MarkImmutable'. r=bsmedberg.
2014-03-27 11:09:53 -04:00
Cameron McCormack
e57ab46ca3
Bug 947578 - Expose Contains on nsBaseHashtable. r=froydnj
2013-12-08 11:08:58 +11:00
Benjamin Smedberg
1246de99b0
Bug 938794 - Annotate OOM size as infallible string or data structures abort, r=froydnj
2013-11-25 15:06:17 -05:00
Birunthan Mohanathas
d655a19190
Bug 784739 - Switch from NULL to nullptr in xpcom/ (2/3); r=ehsan
2013-10-10 16:41:39 -04:00
Robert O'Callahan
51222bdd45
Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
2013-09-02 20:41:57 +12:00
Justin Lebar
de6e31b5aa
Bug 909977 - Rename mozilla::Move to mozilla::OldMove, and make mozilla::Move a synonym for std::move(). r=waldo
2013-08-29 11:54:14 -07:00
Catalin Iacob
f88cdc0744
Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
2013-06-23 14:03:39 +02:00
Joshua Cranmer
fe3ef7a675
Bug 856108 - Port static analyses to clang, part 2f: use MOZ_STACK_CLASS in xpcom. r=bsmedberg
2013-04-11 22:21:40 -05:00
Kyle Huey
58d28ad15e
Bug 855804: Add hashtable helpers for cycle collection. r=bz
2013-04-03 09:49:17 -07:00
Boris Zbarsky
bdb744e60e
Bug 815671 part 9. Fix hashtables to take a UserDataType reference on put, so that putting an array works. r=bsmedberg
2012-11-29 11:14:14 -05:00
Ehsan Akhgari
243c878d26
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
8b4a23fc4c
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Joshua Cranmer
a9921e1d15
Bug 773637 - Kill NS_SCRIPTABLE annotations, Part 1: Remove NS_*PARAM annotations. r=ehsan
2012-07-06 15:14:07 -05:00
Aryeh Gregor
e3e1225e61
Bug 626472 part 1 - Define nsnull as nullptr where available; r=ehsan
2012-07-20 14:16:17 +03:00
Nathan Froyd
5bfb1e0bd8
Bug 765326 - atom-table numbers should include the static atom table; r=njn
2012-06-15 15:51:42 -04:00
Gervase Markham
cb6a072c2a
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Benjamin Smedberg
2b55dddfca
Bug 734847 part 2 - treewide changes resulting from the default-infallibility of hashtables; either remove useless result checks, or use the fallible version of APIs, depending on context, r=jlebar
2012-05-18 13:30:49 -04:00
Benjamin Smedberg
e14bd0e946
Bug 734847 - Make nsTHashtable and its derivatives be infallible to OOM by default; code which is prepared to handle OOM conditions must use the explicit fallible_t() methods, r=jlebar
2012-05-18 12:42:01 -04:00
Jonathan Kew
dcf83f4aa9
bug 737863 - nsBaseHashtable::SizeOfExcludingThis should be declared const. r=njn
2012-03-23 12:13:56 +00:00
Nicholas Nethercote
4a08d8675f
bug 737412 - handle null sizeOfEntryExcludingThis pointer within ns{T,Base}Hashtable SizeOfExcludingThis functions. r=jfkthame
2012-03-23 12:13:44 +00:00
Ryan VanderMeulen
5aaf606e25
Backout 1152d14294df, 18c70ab50559, dbd51616925a, 730c2e84247f, and 7beb8fd46629 due to perma-hangs on WinXP debug moth. (test_memoryReporters.xul | application timed out after 330 seconds with no output)
2012-03-23 17:04:28 -04:00
Jonathan Kew
b27832fe97
bug 737863 - nsBaseHashtable::SizeOfExcludingThis should be declared const. r=njn
2012-03-23 12:13:56 +00:00
Nicholas Nethercote
81b5df080d
bug 737412 - handle null sizeOfEntryExcludingThis pointer within ns{T,Base}Hashtable SizeOfExcludingThis functions. r=jfkthame
2012-03-23 12:13:44 +00:00
Mounir Lamouri
14d4d8dee9
Bug 716338 - Use FAIL_ON_WARNINGS in content/html/content/src. r=bz
2012-01-09 18:58:30 +01:00
Nicholas Nethercote
598607c7a1
Bug 697335 - Another memory reporter for the startup cache. r=taras.
2011-12-18 16:20:36 -08:00
Nicholas Nethercote
84b4854a0a
Bug 697335 - Add nsBaseHashtable::SizeOfExcludingThis(). r=bz.
2011-12-18 14:39:47 -08:00
Ehsan Akhgari
478ad1a412
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
Michael Wu
0fe7772ece
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
2011-09-28 23:19:26 -07:00
Eli Friedman
7a7cef58c8
Bug 573210 - Consistently qualify accesses to dependent base classes in xpcom C++ code. r=dbaron
2010-06-30 23:11:43 +02:00
Benjamin Smedberg
e2f2c8891a
Bug 570488 - Stop reading/writing xpti.dat and incrementally loading XPT files [1/2] r=Mossop
2010-06-14 16:05:48 -07:00
Benjamin Smedberg
e66978d628
Bug 469072 - Annotations in XPCOM, and a couple related code fixups, to make outparams spit out useful warnings, r=bent
2008-12-11 15:13:52 -05:00
Arpad Borsos
1b55360c07
Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; r+sr=brendan
2008-10-10 17:04:34 +02:00
1fd1fd3713
Bug 398435 - "PRBool misuse bugs in xpcom/" [p=taras r=bsmedberg a1.9=sayrer]
2007-10-19 16:26:52 -07:00