Commit Graph

2533 Commits

Author SHA1 Message Date
Nathan Froyd
0a799593e9 Bug 1207245 - part 5 - rename template parameters for nsRefPtrHashtable; r=ehsan
Having a template parameter conflict with a global name is terribly
inconvenient, so let's try to avoid that by renaming the 'RefPtr'
template parameter to something else.
2015-10-12 22:40:08 -04:00
Xidorn Quan
6ab3d4ccd1 Bug 1213130 - Make several string function to accept char16ptr_t instead of char16_t*, and remove redundant overloads. rs=froydnj
--HG--
extra : source : d2dbd4e5316efb888335c92950d32ce77abc41e5
2015-10-10 12:19:23 +11:00
Xidorn Quan
7ba467bc22 Bug 1186745 part 6 - Fix event leak when using NS_DispatchToCurrentThread. r=froydnj
--HG--
extra : source : c8159664670c96e6cfa4c856d6eb14bb9495cd6f
2015-10-06 13:00:59 +11:00
Xidorn Quan
98d15627f8 Bug 1186745 part 1 - Add LeakRefPtr for pointer leaking by default. r=froydnj
This class can be used instead of raw pointer for a sound leaking-by-default
behavior. Also it could take advantage of move semantic check in the future.

--HG--
extra : source : 6bf72b4eaa92b13d42b547d8aeee677489a4d3e2
2015-10-06 13:00:59 +11:00
Nicholas Nethercote
f72bee4d5f Bug 1209351 (part 1) - Add an overloading of nsTHashTable::RemoveEntry() that takes an already-found entry. r=froydnj.
--HG--
extra : rebase_source : 9e48b42e9bd59732e2c2a6c436e9ee258d5c1cd9
2015-09-24 16:12:38 -07:00
Nathan Froyd
b98e01e02a Bug 1210871 - don't use reinterpret_cast in nsTHashtable.h; r=erahm
We don't need to reinterpret_cast when casting from void*, and we don't
need to reinterpret_cast when we're casting up and down a class
hierarchy.  static_cast takes care of those cases just fine, and doesn't
scare the reader into thinking that nsTHashtable is doing something
unusual.
2015-10-02 20:32:15 -04:00
Wes Kocher
1d312920f4 Backed out 6 changesets (bug 1186745) for android Cpp failures
Backed out changeset 237a6acf0709 (bug 1186745)
Backed out changeset 7b530871783a (bug 1186745)
Backed out changeset 73f73b531fc8 (bug 1186745)
Backed out changeset e36909748ddf (bug 1186745)
Backed out changeset 3a31df8787f0 (bug 1186745)
Backed out changeset df9cb8f5f0a5 (bug 1186745)
2015-10-02 10:35:09 -07:00
Xidorn Quan
863594b840 Bug 1186745 part 6 - Fix event leak when using NS_DispatchToCurrentThread. r=froydnj
--HG--
extra : source : a0baaf79582846e447014b2e933266c3150941aa
2015-10-03 00:18:24 +10:00
Xidorn Quan
4dad63f727 Bug 1186745 part 1 - Add LeakRefPtr for pointer leaking by default. r=froydnj
This class can be used instead of raw pointer for a sound leaking-by-default
behavior. Also it could take advantage of move semantic check in the future.

--HG--
extra : source : 47cd2c22bafc8d4bb1c7e1dce3b45517aaec199f
2015-10-03 00:18:24 +10:00
Nick Fitzgerald
30e17cfd82 Bug 1196461 - De-duplicate strings in heap snapshot core dumps; r=shu,jimb
This changeset replaces all of the

    // char16_t[]
    optional bytes someProperty = 1;

one- and two-byte string properties in the CoreDump.proto protobuf definition
file with:

    oneof {
        // char16_t[]
        bytes  someProperty    = 1;
        uint64 somePropertyRef = 2;
    }

The first time the N^th unique string is serialized, then someProperty is used
and the full string is serialized in the protobuf message. All following times
that string is serialized, somePropertyRef is used and its value is N.

Among the other things, this also changes JS::ubi::Edge::name from a raw pointer
with commented rules about who does or doesn't own and should and shouldn't free
the raw pointer to a UniquePtr that enforces those rules rather than relying on
developers reading and obeying the rules in the comments.
2015-09-30 16:03:31 -07:00
Nathan Froyd
b62a707f2b Bug 1209969 - remove prlock.h include from nsBaseHashtable.h; r=erahm
nsBaseHashtable.h doesn't use PRLock.
2015-09-30 00:51:28 -04:00
Jason Orendorff
deb2270515 Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : 6KCxWrCseSZ
extra : rebase_source : 63f3cd6ec1ade43c732ffd9b661fe6f2dca9eb4b
2015-03-20 16:28:59 -05:00
Phil Ringnalda
c096566a7e Back out 6 changesets (bug 1186745) for cpptest failure in runnable_utils_unittest, nrappkit_unittest, test_nr_socket_unittest
Backed out changeset c6142b815de0 (bug 1186745)
Backed out changeset d8f740ef2430 (bug 1186745)
Backed out changeset edc0b56d81fa (bug 1186745)
Backed out changeset 383f8ac033ea (bug 1186745)
Backed out changeset ce960a661987 (bug 1186745)
Backed out changeset 3e9783023fb2 (bug 1186745)

--HG--
extra : rebase_source : 4681d6abaaa927ddb863f944efc87e6c6f6c2e26
2015-09-28 19:05:02 -07:00
Xidorn Quan
e26e72c529 Bug 1186745 part 6 - Fix event leak when using NS_DispatchToCurrentThread. r=froydnj
--HG--
extra : source : 839c394ca2362db534c9a12b14be3a9f3f5d6ff5
2015-09-29 09:28:22 +10:00
Xidorn Quan
661f0a0891 Bug 1186745 part 1 - Add LeakRefPtr for pointer leaking by default. r=froydnj
This class can be used instead of raw pointer for a sound leaking-by-default
behavior. Also it could take advantage of move semantic check in the future.

--HG--
extra : source : 3dbd000739dc0ea214a2292e3983469e41e99686
2015-09-29 09:28:22 +10:00
Wes Kocher
b19d88b060 Backed out 7 changesets (bug 1206168, bug 1177318, bug 1054756) for hazard build failures CLOSED TREE
Backed out changeset e892727a373a (bug 1206168)
Backed out changeset 6c93d1044b7e (bug 1054756)
Backed out changeset 105433ce195b (bug 1054756)
Backed out changeset 13128a88f2b9 (bug 1054756)
Backed out changeset c250abf4fd17 (bug 1054756)
Backed out changeset fc9fef646a97 (bug 1054756)
Backed out changeset c8897f109a08 (bug 1177318)
2015-09-23 12:31:19 -07:00
Jason Orendorff
54e92d9beb Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : KrjkP1flM3c
extra : rebase_source : 8c367e3158528e92ac8ebc51521d32472f1e5bb1
2015-03-20 16:28:59 -05:00
Chris Peterson
71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Nicholas Nethercote
647b520991 Bug 1201135 - Rename pldhash.{h,cpp} to PLDHashTable.{h,cpp}. r=mccr8.
--HG--
rename : xpcom/glue/pldhash.cpp => xpcom/glue/PLDHashTable.cpp
rename : xpcom/glue/pldhash.h => xpcom/glue/PLDHashTable.h
extra : rebase_source : 06b9d30db96ed78500fd44d9c0b51609103508a3
2015-09-15 20:49:53 -07:00
Chris Peterson
0dbaae1ce2 Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00
Kan-Ru Chen
28c419dcc1 Bug 1123237 - Part 10. Expose SwapElements from nsBaseHashtable. r=nfroyd 2015-09-16 10:31:13 +08:00
Nicholas Nethercote
2ee4fd783b Bug 1121760 (part 6) - Move all remaining PL_DHash*() functions into PLDHashTable. r=poiru.
--HG--
extra : rebase_source : 3cdc975507170d783b02d70f7c7d95c6bf2e1bcd
2015-09-14 14:23:47 -07:00
Nicholas Nethercote
63e79d16db Bug 1121760 (part 5) - Remove PL_DHashMarkTableImmutable(). r=poiru.
--HG--
extra : rebase_source : 8617d7f3d8034832321145789cc0108f6a0878df
2015-09-14 14:23:27 -07:00
Nicholas Nethercote
ecf0b741cd Bug 1121760 (part 4) - Remove PL_DHashTableRawRemove(). r=poiru.
--HG--
extra : rebase_source : 9989b2171b8213512ce779415812fa04471fde22
2015-09-14 14:23:26 -07:00
Nicholas Nethercote
59683492e5 Bug 1121760 (part 3) - Remove PL_DHashTableRemove(). r=poiru.
--HG--
extra : rebase_source : c34d693de4aca45f2ea05c2767c8b1007c89df29
2015-09-14 14:23:24 -07:00
Nicholas Nethercote
479244f7c9 Bug 1121760 (part 2) - Remove PL_DHashTableAdd(). r=poiru.
--HG--
extra : rebase_source : 41eb939bfb5c925cba58b1af57abce9a4e5fdb30
2015-09-14 14:23:12 -07:00
Nicholas Nethercote
fcfdd8f54b Bug 1121760 (part 1) - Remove PL_DHashTableSearch(). r=poiru.
--HG--
extra : rebase_source : 770e1f49a451ecbadd778e071b204611e27cf701
2015-05-21 00:34:25 -07:00
Andrew McCreight
5446225d17 Bug 1201271 - Warn about unused results for more methods of nsTArray. r=froydnj
This leaves alone the AppendElement methods.
2015-09-15 15:30:44 -07:00
Michael Layzell
0097c41e01 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Michael Layzell
1eaae658aa Bug 1156802 - Part 2: Remove all explicit move constructors, r=ehsan 2015-09-12 12:34:45 -04:00
Nicholas Nethercote
de8fceb34d Bug 1202526 (part 1) - Add PLDHashTable::RemoveEntry(). r=froydnj.
This patch also consolidates the shrink handling so it's now entirely within
ShrinkIfAppropriate().
2015-09-07 19:20:12 -07:00
Wes Kocher
ba9de6a2f7 Backed out changeset f5b2a11c64c9 (bug 1201271) for bustage 2015-09-09 15:56:21 -07:00
Andrew McCreight
3e590f4e78 Bug 1201271 - Warn about unused results for more methods of nsTArray. r=froydnj
This leaves alone the AppendElement methods.
2015-09-09 15:39:10 -07:00
Phil Ringnalda
90583f7067 Backed out 10 changesets (bug 1123237) for hazard build failures and Windows test failures
CLOSED TREE

Backed out changeset 9c26b3b787f8 (bug 1123237)
Backed out changeset 1fcec0dc93d5 (bug 1123237)
Backed out changeset 390033ceebb6 (bug 1123237)
Backed out changeset e8a1845876d6 (bug 1123237)
Backed out changeset 714ec40715fa (bug 1123237)
Backed out changeset 5ed952e011c3 (bug 1123237)
Backed out changeset c785df6c0cdf (bug 1123237)
Backed out changeset d69e2d195a24 (bug 1123237)
Backed out changeset 1f328807da1d (bug 1123237)
Backed out changeset a1546857dce9 (bug 1123237)
2015-09-05 13:49:39 -07:00
Kan-Ru Chen
ab9d4cc8c0 Bug 1123237 - Part 10. Expose SwapElements from nsBaseHashtable. r=nfroyd 2015-09-06 00:13:26 +08:00
Eric Rahm
f8b8e77b55 Bug 1199400 - Part 1: Use CheckedInt when growing nsDeque capacity. r=froydnj 2015-09-03 13:33:46 -07:00
Eric Rahm
42bed38c5e Bug 1199400 - Part 0: Remove unused nsDequeIterator. r=froydnj 2015-09-04 15:04:58 -07:00
Andrew McCreight
13445609b8 Backed out changeset 351d5f864f9e for not compiling. 2015-09-04 09:52:24 -07:00
Andrew McCreight
cc00f8d5c9 Bug 1201271 - Warn about unused results for more methods of nsTArray. r=froydnj
This leaves alone the AppendElement methods.
2015-09-04 09:45:44 -07:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Seth Fowler
523787b5ca Bug 1181907 (Part 1) - Make it possible to use nsGenericHashKey with free functions. r=heycam 2015-08-26 18:19:31 -07:00
Chris Peterson
1416e566de Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium 2015-08-25 09:14:38 -07:00
Chris Peterson
6b261a1c9e Bug 1197563 - Polyfill __func__ for MSVC 2013 and earlier. r=froydnj 2015-08-20 23:39:18 -07:00
Miko Mynttinen
ba173ae5e4 Bug 1197316 - Remove PR_snprintf calls in xpcom/. r=froydnj 2015-08-22 17:57:52 -07:00
Xidorn Quan
9960d37ffb Bug 1196050 - Replace NSCAP_Zero usage with decltype(nullptr). r=froydnj
--HG--
extra : source : 9c567ed00fcf2433e484325bab9a18322718b0da
2015-08-20 10:30:10 +10:00
Aryeh Gregor
f29bc4307b Bug 1010756 - Helpful errors for using nsCOMPtr on non-XPCOM types; r=froydnj 2015-08-12 18:43:10 +03:00
Nicholas Nethercote
5b76d8f3b7 Bug 1181443 (part 3, attempt 2) - Remove nsTHashtable::EnumerateEntries(), which is no longer used. r=froydnj.
--HG--
extra : rebase_source : 232b65e93556a311efaf1f2e0b1aee0449b3838d
2015-07-23 02:37:26 -07:00
Nathan Froyd
3b0a318c70 Bug 1192230 - clean up reference-counting in xpcom/; r=erahm 2015-07-01 12:27:43 -04:00
Birunthan Mohanathas
0527ccb54c Bug 1185763 - Part 4: Swap elements if possible in r-value version of nsTArray::AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas
2b4a52cf2e Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas
5528f2d07d Bug 1185763 - Part 2: Remove non-rvalue version of nsTArray::MoveElementsFrom. r=froydnj 2015-08-11 08:29:46 -07:00
Nicholas Nethercote
deb1dc5d6b Backout 04a196339ca4 (bug 1181443, part 3) so that bug 1182961's patches can be backed out.
--HG--
extra : rebase_source : c2f49d0bfd6a82b35eeed73c0a88f60661c1defd
2015-08-06 16:28:13 -07:00
Nicholas Nethercote
2c850da1f5 Bug 1181443 (part 3) - Remove nsTHashtable::EnumerateEntries(), which is no longer used. r=froydnj.
--HG--
extra : rebase_source : f16a883725371524f0c63d72b09ae69df688673f
2015-07-23 02:37:26 -07:00
Aryeh Gregor
80ea0a3e53 Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj
--HG--
rename : dom/bindings/OwningNonNull.h => xpcom/base/OwningNonNull.h
2015-08-05 15:28:27 +03:00
Nicholas Nethercote
d98d14fa1e Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

--HG--
extra : rebase_source : f98420176f50990bbc5a25e35788328154cfeb00
2015-07-30 21:19:57 -07:00
Nicholas Nethercote
1059c1de13 Bug 1189156 (part 2) - Don't use enumeration style for nsTHashtable::SizeOf{In,Ex}cludingThis(). r=erahm.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

And we still have the existing single-arg SizeOf{In,Ex}cluding() functions,
which work if the entry type itself defines SizeOfExcludingThis().

--HG--
extra : rebase_source : f93de9b789c21b1b148bed9de795f663f77c9dd9
2015-07-29 01:50:52 -07:00
Nicholas Hurley
16407ea724 Bug 1127618 - make push caches work in e10s. r=mcmanus r=froydnj IGNORE IDL
--HG--
extra : rebase_source : 24dd37c6eaec83a1776d77632b97106e8abb8015
2015-07-31 13:50:08 -07:00
Nicholas Nethercote
2d56c1f52e Bug 1189156 (part 1) - Don't use enumeration style for PLDHashTable::SizeOf{In,Ex}cludingThis(). r=froydnj.
After this change, we have PLDHashTable::ShallowSizeOf{In,Ex}cludingThis(),
which don't do anything to measure children. (They can be combined with
iteration to measure children.)

This patch also removes the PL_DHashTableSizeOf{In,Ex}cludingThis() functions.
They're not necessary because the methods can be used instead.

Finally, the patch deliberately converts some SizeOfExcludingThis() calls to
SizeOfIncludingThis(). These are all done on heap pointers so this change is
valid.

--HG--
extra : rebase_source : b1d51096a8e7dcac29d7efd92e28938836ff5481
2015-07-29 22:28:20 -07:00
Nicholas Nethercote
87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07:00
Aidin Gharibnavaz
99b2a37529 Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj
--HG--
extra : rebase_source : 98a86a1ff5d023aa74800de8feb1cfe1846edf03
2015-07-24 12:13:00 -04:00
Bobby Holley
97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Bobby Holley
4762225b99 Bug 1188696 - Remove the XPCOM dependencies in nsRefPtr.h. r=froydnj 2015-07-29 10:44:58 -07:00
Nathan Froyd
c6d5ee54fb Bug 1179787 - part 2 - add template logic for smart pointer template arguments in NS_NewRunnableMethod*; r=botond 2015-07-02 11:17:49 -04:00
Nathan Froyd
8ddd161b85 Bug 1179787 - part 1 - forward StorensRefPtrPassByPtr's constructor argument; r=botond
StorensRefPtrPassByPtr is currently used for storing reference-counted
types passed as T* template arguments to NS_NewRunnableMethodWith*.
We'd also like to use it to store nsRefPtr<T> template arguments.  While
it could be used in its current form, it'd be better for its constructor
to support forwarding, so that something like:

  NS_NewRunnableMethodWithArg<nsRefPtr<T>>(..., nsRefPtr<T>(local));

doesn't cause unnecessary reference counting.
2015-07-02 11:05:52 -04:00
Ryan VanderMeulen
fb6b2747d5 Bug 1180017 - Fix up the badly-horked backout and re-land.
CLOSED TREE

--HG--
extra : amend_source : 0b7ac18429b248cf05cfe33f6b2f6efdf1602c38
extra : histedit_source : bdb11dafa100809ec17491e5711fb0b507e023c6%2C5e4134650a804859dc8b3078688fa4655052263f
2015-07-29 12:31:47 -04:00
Jim Blandy
4e8fc0bdcb Bug 1180017 - Give GCCellPtr is<T> and to<T> methods, replacing isFoo and toFoo methods. Fix callers. r=terrence 2015-07-03 15:06:23 -07:00
Carsten "Tomcat" Book
25a2a75a56 Backed out changeset 465793bc6fcf (bug 1180017) for suspicion of causing bug 1188799 2015-07-29 15:27:12 +02:00
Jacek Caban
1febc8154e Bug 1188431 - Fixed length argument handling in char16ptr_t variant of NS_ConvertUTF16toUTF8 constructor. r=nfroyd 2015-07-29 12:26:40 +02:00
Jim Blandy
ff7cc06ef6 Bug 1180017: Give GCCellPtr is<T> and as<T> methods, replacing isFoo and toFoo methods. Fix callers. r=terrence
--HG--
extra : rebase_source : 4a381c5d8427ad2995426e65c69af1597b1557c2
2015-07-07 09:52:01 -07:00
Ehsan Akhgari
7a81d59cb2 Bug 1188203 - Fix more constructors in XPCOM; r=froydnj 2015-07-28 12:24:37 -04:00
Kyle Huey
6dad638eb2 Bug 1186780: Replace EnumerateRead with new iterators in cycle collection code. r=mccr8 2015-07-26 19:29:52 -07:00
Nicholas Nethercote
dbc67380bd Bug 1187767 - Ensure PLDHashTable's generation is always updated when the entry store is modified. r=froydnj.
--HG--
extra : rebase_source : e70d253257eac422a454d20de0fb94d2ac736e84
2015-07-26 19:57:23 -07:00
Carsten "Tomcat" Book
c9839dd8f9 Backed out changeset 1ca5723f69d4 (bug 1186780) for dom crashes 2015-07-27 08:01:09 +02:00
Kyle Huey
6758447d5d Bug 1186780: Replace EnumerateRead with new iterators in cycle collection code. r=mccr8 2015-07-26 19:29:52 -07:00
Nicholas Nethercote
10da8efa1c Bug 1187197 (part 3) - Convert pldhash.{cpp,h} to C++ style comments. r=froydnj.
--HG--
extra : rebase_source : 4615862ad586e24050a6f5571b8d21689ba3fdf3
2015-07-23 23:13:11 -07:00
Nicholas Nethercote
42e338fc52 Bug 1187197 (part 2) - Put function return types on their own line. r=froydnj.
--HG--
extra : rebase_source : 58e81c134c321faa28e6ab46ed4c6c583a846ab5
2015-07-23 23:13:10 -07:00
Nicholas Nethercote
49a82c55c8 Bug 1187197 (part 1) - Move comments from PL_DHashTable* functions to the equivalent methods. r=froydnj.
Because the PL_DHashTable* functions will go away eventually (bug 1121760).

--HG--
extra : rebase_source : 6bd5aedf71c162102f4a7e06347c868d5dd78dbd
2015-07-23 21:43:48 -07:00
Michael Layzell
660f381a2f Bug 1159433 - Part 4: Mark nsTAutoString_CharT and nsAutoArrayBase as non-memmovable; r=froydnj 2015-07-24 19:15:40 -04:00
Michael Layzell
66a04cf80f Bug 1159433 - Part 3: Make nsTArray_CopyChooser only accept memmovable argument types by default; r=froydnj 2015-07-24 19:15:23 -04:00
Michael Layzell
69cc6fcb31 Bug 1123907 - Part 2: Add MOZ_NEEDS_NO_VTABLE_TYPE to Attributes.h, and use it to verify the EntryType argument of nsTHashtable; r=ehsan 2015-07-24 19:14:09 -04:00
Xidorn Quan
658cb19c1f Bug 1187201 - Add char16 wrapper constructor for NS_ConvertUTF16toUTF8 in external string API. r=froydnj
--HG--
extra : source : 0facdb6085164a2f5a1674f795fc7a2df4332ca3
2015-07-24 23:06:50 +10:00
Birunthan Mohanathas
4db7ee5707 Bug 1185589 - Properly handle self-assignment in nsTArray::operator=. r=mccr8 2015-07-21 09:42:58 -07:00
Nicholas Nethercote
4ade448a75 Bug 1185399 (part 2) - Remove macros from pldhash.cpp. r=froydnj. 2015-07-20 17:15:00 -07:00
Nicholas Nethercote
954e563acc Bug 1185399 (part 1) - Remove macros from pldhash.h. r=froydnj. 2015-07-20 17:06:38 -07:00
Kyle Huey
ee4f5ba9fb Bug 1185470: Remove 'Get' prefixes from hashtable iterator methods. r=froydnj 2015-07-20 20:21:28 +08:00
Benoit Girard
819a9fd767 Bug 1182516 - Fix mid-air conflict with 3fd2ab6cb762 on a CLOSED TREE. r=bustage
--HG--
extra : commitid : Adcu7H4oTQG
2015-07-15 18:08:25 -04:00
Olli Pettay
bf12e17af3 Bug 1182277, don't leak when using nsAutoTArray inside nsTArray, r=nfroyd
--HG--
extra : rebase_source : f2ef5f9be86461490ad87e4862e1f77f88b33ade
2015-07-14 17:05:10 +03:00
Nicholas Nethercote
4aa7305199 Bug 1180122 - Make Chaos Mode affect PLDHashTable's iterators. r=froydnj.
This makes the code less elegant, but that's unavoidable.

--HG--
extra : rebase_source : 585034bcd8383102669caf2378d705234410d8a9
2015-07-03 00:27:27 -07:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell
fafaf07b01 Bug 1028132 - Remove mozilla::HasDangerousPublicDestructor<T>. r=mccr8 2015-07-07 18:45:00 -04:00
Nicholas Nethercote
d367971294 Bug 1181445 (part 11) - Use nsBaseHashTable::Iterator in xpcom/glue/. r=froydnj.
--HG--
extra : rebase_source : 5b6fe9813c08627f626fa8da66a8e724baa274aa
2015-07-09 16:54:59 -07:00
Nicholas Nethercote
240d180d7f Bug 1181445 (part 5) - Use nsTHashTable::Iterator in nsTHashtable.h. r=mccr8.
This is a particularly nice example of how iterators can be so much nicer than
Enumerate()-style functions:

  1 file changed, 4 insertions(+), 33 deletions(-)

--HG--
extra : rebase_source : 757f75b90cb4c624143c236f9743edf158f72d66
2015-07-09 16:54:59 -07:00
Nicholas Nethercote
b37d03af49 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.

--HG--
extra : rebase_source : 9d61cc8f4c14082c9f1939ff3ced2b697e043f42
2015-07-07 20:47:59 -07:00
Randell Jesup
f5e826fd1d Bug 1155059: Patch 4 - invoke NS_ASSERTION if DispatchToMainThread fails to get MainThread ptr r=froydnj 2015-07-09 23:21:46 -04:00
Randell Jesup
c87c478f4f Bug 1155059: Patch 1&2 - Convert Dispatch() and friends to already_AddRefed<> r=froydnj
Modify Dispatch IDL and code to deal with MSVC issues with overloaded templates r=froydnj
2015-07-09 23:21:46 -04:00
Mike Hommey
7fdec3adb1 Bug 833117 - Replace g_slice_set_config() with G_SLICE environment variable. r=nfroyd,r=karlt
Using g_slice_set_config() fails with newer glib because the slice allocator
now has a static constructor that runs when glib is loaded, consequently
emitting a noisy error message which confuses people into believing it's the
root of their problems.

The only way left to force the slice allocator to use "system" malloc (in
practice, jemalloc) is to set the G_SLICE environment variable to
always-malloc, and that needs to happen before glib is loaded.

Fortunately, the firefox and plugin-container executables don't depend on
glib. Unfortunately, webapprt does, so the problem remains for web apps
running through it. xpcshell and other executables that depend on libxul
directly (as opposed to loading it dynamically) are not covered either.
2015-07-10 09:56:05 +09:00
Nicholas Nethercote
f976bf5495 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
Birunthan Mohanathas
30fedff9e1 Bug 968520 - Add nsTArray::Assign. r=froydnj 2015-07-07 11:27:03 -07:00
Nicholas Nethercote
b6a6d26147 Bug 1180072 - Remove PL_DHashTableEnumerate(). r=froydnj.
It's no longer used, and the Iterator classes are much nicer. Yay.
2015-06-18 22:19:10 -07:00
Nicholas Nethercote
bdb164e9fd Bug 1131308 (part 1) - Improve PLDHashTable's internal checking. r=froydnj.
--HG--
extra : rebase_source : 7801b437c2b9a82de90914a67e80acabba81570b
2015-05-20 23:11:35 -07:00
Nicholas Nethercote
4a9000e192 Bug 1131308 (part 0) - Fix minor problems with RemovingIterator. r=froydnj.
- Its move constructor was moving |aOther.mTable| instead of |aOther|. This
  meant that |aOther| wasn't being zeroed out appropriately.

- test_pldhash_RemovingIterator() was testing Iterator's move constructor
  instead of RemovingIterator's move constructor, due to a copy/paste
  mistake.

--HG--
extra : rebase_source : 1f4880893875218ddb155c76d329e84d884c0432
2015-07-05 17:49:44 -07:00
Nicholas Nethercote
059c658d95 Bug 1179657 - Remove PL_DHASHMETER. r=froydnj.
Because it's totally busted and not a very good way of getting that kind of
statistics.
2015-07-01 22:59:53 -07:00
Mike Hommey
f2057d31b4 Backout changeset f70b74488807 (bug 833117) for gtest bustage on Linux 2015-07-01 16:41:20 +09:00
Mike Hommey
6535b630b6 Bug 833117 - Replace g_slice_set_config() with G_SLICE environment variable. r=nfroyd,r=karlt
Using g_slice_set_config() fails with newer glib because the slice allocator
now has a static constructor that runs when glib is loaded, consequently
emitting a noisy error message which confuses people into believing it's the
root of their problems.

The only way left to force the slice allocator to use "system" malloc (in
practice, jemalloc) is to set the G_SLICE environment variable to
always-malloc, and that needs to happen before glib is loaded.

Fortunately, the firefox and plugin-container executables don't depend on
glib. Unfortunately, webapprt does, so the problem remains for web apps
running through it. xpcshell and other executables that depend on libxul
directly (as opposed to loading it dynamically) are not covered either.
2015-07-01 15:29:46 +09:00
Ryan VanderMeulen
faaac1a61d Backed out changeset 37bee149c935 (bug 968520) for checktest failures. 2015-06-30 15:47:18 -04:00
Birunthan Mohanathas
ebd21e20f1 Bug 968520 - Add nsTArray::Assign. r=froydnj 2015-06-30 11:16:03 -07:00
Nicholas Nethercote
459a5b589b Bug 1176163 - Remove remaining uses of PL_DHashTableEnumerate() from xpcom/. r=froydnj.
--HG--
extra : rebase_source : 5e79d10647c138a28370d36d28a1c1227af8167b
2015-06-18 18:09:37 -07:00
Benoit Girard
8d6a67f6d3 Bug 1172216 - Move nsStackwalk to mozglue. r=glandium
--HG--
rename : xpcom/base/nsStackWalk.cpp => mozglue/misc/StackWalk.cpp
rename : xpcom/base/nsStackWalk.h => mozglue/misc/StackWalk.h
extra : commitid : EMbWGfjKvdq
extra : rebase_source : b7308eb569cc1a019d3b7a92aaff0de7a49b5682
2015-06-10 16:32:45 -04:00
Nicholas Nethercote
0d28f19c4a Bug 1173600 (part 3) - Add PLDHashTable::RemovingIterator. r=froydnj.
--HG--
extra : rebase_source : 1158e03a699987e366b46b9e045613f6b9fe1a59
2015-06-10 17:04:07 -07:00
Nicholas Nethercote
fb490785c1 Bug 1173600 (part 2) - Move post-enumeration shrinking code into its own function. r=froydnj.
This will allow it to be re-used by the removing iterator class.

--HG--
extra : rebase_source : 2bdd33427894c291aa507469628a3ba99b80c568
2015-06-10 16:36:02 -07:00
Nicholas Nethercote
e8172cd960 Bug 1173600 (part 1) - Tweak PLDHashTable post-enumeration shrinking. r=froydnj.
This patch factors out the existing capacity calculation code in HashShift()
into a new function called BestCapacity(), and then reuses it for
post-enumeration shrinking.

BestCapacity() computes capacity with |CeilingLog2(ceil(length * 4 / 3))|,
which ensures a minimum capacity while respecting the "max 75% full" and
"capacity is a power of two" constraints. In contrast, the old post-enumeration
shrink calculation was |CeilingLog2(length + length/2)|, which gives higher
results in some cases. (Both calculations also ensured the capacity wasn't too
small.) E.g. if length is 48, the former calculation will give 64, while the
latter will give 128.

Therefore, post-enumeration shrinking will no longer give a
larger-than-necessary capacity some cases. This feels like the right thing to
do in isolation, and making it consistent with HashShift() -- used during table
construction -- is also good.

--HG--
extra : rebase_source : 55e982b601c345d10da7abd03a13aec3f5b61598
2015-06-10 13:54:06 -07:00
Nicholas Nethercote
e94846adea Bug 11746250 (follow-up) - Fix link errors on Linux and Android. r=me. 2015-06-16 23:48:53 -07:00
Nicholas Nethercote
a1b715b5df Bug 1174625 - Overhaul PLDHashTable's iterator. r=froydnj.
This change splits PLDHashTable::Iterator::NextEntry() into two separate
functions, which allow you to get the current element and advance the iterator
separately, which means you can use a for-loop to iterate instead of a
while-loop.

As part of this change, the internals of PLDHashTable::Iterator were
significantly changed and simplified (and modelled after js::HashTable's
equivalent code). It's no longer duplicating code from PL_DHashTableEnumerator.
The chaos mode code was a casualty of this, but given how unreliable that code
has proven to be (see bug 1173212, bug 1174046) this is for the best. (We can
reimplement chaos mode once PLDHashTable::Iterator is back on more solid
footing again, if we think it's important.)

All these changes will make it much easier to add an alternative Iterator that
removes elements, which was turning out to be difficult with the prior code.

In order to make the for-loop header usually fit on a single line, I
deliberately renamed a bunch of things to have shorter names.

In summary, you used to write this:

  PLDHashTable::Iterator iter(&table);
  while (iter.HasMoreEntries()) {
    auto entry = static_cast<FooEntry*>(iter.NextEntry());
    // ... do stuff with |entry| ...
  }
  // iter's scope extends beyond here

and now you write this:

  for (auto iter = table.Iter(); !iter.Done(); iter.Next()) {
    auto entry = static_cast<FooEntry*>(iter.Get());
    // ... do stuff with |entry| ...
  }
  // iter's scope doesn't reach here

--HG--
extra : rebase_source : fa5cac2fc50b1ab7624030bced4763131280f4d8
2015-06-11 21:19:53 -07:00
Ted Mielczarek
e334ff0faa bug 1171574 - XPCOMGlue doesn't need LEADING_UNDERSCORE for iOS. r=froydnj
--HG--
extra : commitid : LBrmqR9ER7F
extra : rebase_source : 4eae25899a0a82b1e09be04570fab7927ca0354a
2015-02-10 15:36:37 -05:00
Nicholas Nethercote
d2a5b36906 Bug 1174046 - Fix PLDHashTable::Iterator in chaos mode again. r=froydnj.
If you use PLDHashTable::Iterator in chaos mode with a table with zero
capacity, a |% 0| operation takes place in randomUint32LessThan. This change
avoids that.

--HG--
extra : rebase_source : 85f2affb57c2402f40f3d117434b8300e7f204b7
2015-06-11 18:23:26 -07:00
Nicholas Nethercote
ea80354c08 Bug 1172782 - Change how nsTHashtable::Clear() works. r=froydnj.
This change reimplements nsTHashtable::Clear() using PLDHashable::Clear(). This
changes its semantics slightly -- the old version would clear the table but
leave its capacity unchanged. The new version will adjust the capacity
to the default, though the entry storage will only be re-allocated when the
first new element is added.
2015-06-10 13:07:40 -07:00
Birunthan Mohanathas
3aad780da9 Bug 968520 - Always require fallible argument with FallibleTArray calls. r=froydnj 2015-06-10 14:30:41 -07:00
Nicholas Nethercote
b9657718d7 Bug 1173212 (part 2) - Make PLDHashTable::Iterator work in chaos mode. r=froydnj.
Iterator::NextEntry() miscomputes |entryLimit|. This doesn't matter in
non-chaos mode because we'll always find a live entry before hitting that
limit. But it does matter in chaos mode because it means we don't wrap around
when we should.

It's clear how this mistake was made -- the code from Enumerate() was copied.
In Enumerate() |mEntryStore| and |entryAddr| are the same when |entryLimit| is
computed, so you can use them interchangeably. But in NextEntry() |mEntryAddr|
will have moved past |mEntryStore|, so you have to use |mEntryStore|. I changed
both functions in the same way to keep the correspondence between them obvious.

--HG--
extra : rebase_source : f27558b3179be394526d1c3f82ffbae0fb58b2b9
2015-06-10 12:47:18 -07:00
Nicholas Nethercote
9d20c7e3aa Bug 1173212 (part 1) - Remove some can't-fail tests in PLDHashTable. r=froydnj.
--HG--
extra : rebase_source : 2d1c0111bf8bd13b76fe4e88da92ba367e6482d9
2015-06-10 12:47:18 -07:00
Eric Rahm
a95516e580 Bug 1171716 - Part 1: Add NS_ReleaseOnMainThread. r=froydnj 2015-06-10 08:33:27 -07:00
Wes Kocher
54bccdc15f Backed out 5 changesets (bug 1171716) for android bustage
Backed out changeset 4986f8464f9c (bug 1171716)
Backed out changeset bc8405b07d10 (bug 1171716)
Backed out changeset 10e18e494630 (bug 1171716)
Backed out changeset be499a3cae5d (bug 1171716)
Backed out changeset f75717d3eba0 (bug 1171716)
2015-06-09 18:48:37 -07:00
Eric Rahm
008f4df152 Bug 1171716 - Part 1: Add NS_ReleaseOnMainThread. r=froydnj 2015-06-09 18:25:43 -07:00
Birunthan Mohanathas
2db38a1d84 Bug 968520 - Add more fallible variants of nsTArray::InsertElementsAt. r=froydnj 2015-06-09 17:27:31 -07:00
Birunthan Mohanathas
5cce2e644c Bug 968520 - Add fallible variants of nsTArray::InsertElementSorted. r=froydnj 2015-06-08 13:39:57 -07:00
Birunthan Mohanathas
c864230df7 Bug 968520 - Make nsTArray::InsertElementSorted support moves. r=froydnj 2015-06-08 13:39:53 -07:00
Birunthan Mohanathas
53c8a09de0 Bug 968520 - Add mozilla::fallible to FallibleArray calls in tests. r=froydnj 2015-06-08 13:39:49 -07:00
Nicholas Nethercote
b4d714b84f Bug 1171323 - Remove PL_DHashFreeStringKey(), because it's dead. r=froydnj.
--HG--
extra : rebase_source : 1c0d5a858e6deab28c9118f8d2c6dea6a867dd81
2015-06-04 16:14:37 -07:00
Nicholas Nethercote
2fba2d028e Bug 1170934 (part 2) - Fix the comment for PL_DHashTableRemove(). r=froydnj.
--HG--
extra : rebase_source : 85258e2402a9f0b8fbeefd76c4e405cfb8eb887f
2015-06-03 17:05:12 -07:00
Nicholas Nethercote
cc64c96ae6 Bug 1170934 (part 1) - Remove PLDHashTable::{Init,Fini}(). r=froydnj.
--HG--
extra : rebase_source : 1d1ac910420fbc12c7e2501c74680cce00387c63
2015-05-20 21:25:55 -07:00
Eric Rahm
518166f0c8 Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-03 15:26:07 -07:00
Eric Rahm
6c63bbb91a Bug 1165515 - Part 13-1: Add log level enum class. r=froydnj
This adds the mozilla::LogLevel enum class. Additionaly a log_test function is
added to use rather than a macro, this allows us to enforce only
mozilla::LogLevel is passed into the function.
2015-06-03 15:22:39 -07:00
Eric Rahm
a21afeb115 Bug 1165515 - Part 6: Add PR_LOG_VERBOSE. r=froydnj 2015-06-03 15:22:31 -07:00
Eric Rahm
b4a01ca56b Bug 1165515 - Part 4: Add PR_LOG_INFO. r=froydnj
This is an interstitial step in preparation for adding a new info level. For
now it just maps to debug.
2015-06-03 15:22:29 -07:00
Eric Rahm
1b710d4396 Bug 1165515 - Part 2: Add MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:26 -07:00
Ryan VanderMeulen
8e70b92b80 Backed out changeset c1cd7aff7c94 (bug 1163320) for causing silent Hazard build bustage.
--HG--
extra : rebase_source : 34f9d17d9c9c3b2bfd5bd8d4be48a05acc0c5908
2015-06-03 12:46:19 -04:00
Nicholas Nethercote
383a496bf6 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.

--HG--
extra : rebase_source : 3d1fb72aee4dd21ff20db0ff3166d4e932ade897
2015-05-20 21:23:55 -07:00
Nicholas Nethercote
686f24db33 Bug 1170416 (part 4) - Remove some unnecessary casts. r=froydnj.
--HG--
extra : rebase_source : aa90639cb8fb0cbc0fcae0ec9a0388f7e3cf628f
2015-05-20 21:16:59 -07:00
Nicholas Nethercote
e849e6588b Bug 1170416 (part 3) - Remove the PLDHashTable2 typedef. r=froydnj.
--HG--
extra : rebase_source : 9510ea47204fffa163cac43aeaaac6ae1ad80419
2015-05-19 16:46:17 -07:00
Nicholas Nethercote
5ea7821921 Bug 1170416 (part 2) - Merge PLDHashTable2 back into PLDHashTable. r=froydnj.
--HG--
extra : rebase_source : 001115f48ce363db098f66457994cc6a3785a156
2015-06-02 01:58:58 -07:00
Nicholas Nethercote
54766ec371 Bug 1170416 (part 1) - Remove PL_DHashTable{Init,Finish,Destroy){} and PL_NewDHashTable(). r=froydnj.
--HG--
extra : rebase_source : 8263b1fecd550ba6356f99537cdaf439c24680ae
2015-05-18 23:02:05 -07:00
Terrence Cole
760b29c216 Bug 1169791 - Strongly type NoteJSRoot; r=mccr8
--HG--
extra : rebase_source : 44b4b6ecb67677caf3180b353fc828c972d4e1f9
2015-05-29 12:57:23 -07:00
Carsten "Tomcat" Book
5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm
38901afce4 Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-01 22:17:34 -07:00
Eric Rahm
9bc793760d Bug 1165515 - Part 13-1: Add log level enum class. r=froydnj
This adds the mozilla::LogLevel enum class. Additionaly a log_test function is
added to use rather than a macro, this allows us to enforce only
mozilla::LogLevel is passed into the function.
2015-06-01 22:17:31 -07:00
Eric Rahm
5e397ff4b7 Bug 1165515 - Part 6: Add PR_LOG_VERBOSE. r=froydnj 2015-06-01 22:17:22 -07:00
Eric Rahm
8289861381 Bug 1165515 - Part 4: Add PR_LOG_INFO. r=froydnj
This is an interstitial step in preparation for adding a new info level. For
now it just maps to debug.
2015-06-01 22:17:20 -07:00
Eric Rahm
ef4c50584c Bug 1165515 - Part 2: Add MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:17 -07:00
Wes Kocher
4e9f80ed2e Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
e8a5eb8d6e Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-01 14:31:01 -07:00
Eric Rahm
7fe9ffc48b Bug 1165515 - Part 13-1: Add log level enum class. r=froydnj
This adds the mozilla::LogLevel enum class. Additionaly a log_test function is
added to use rather than a macro, this allows us to enforce only
mozilla::LogLevel is passed into the function.
2015-06-01 14:31:01 -07:00
Eric Rahm
033d62915a Bug 1165515 - Part 6: Add PR_LOG_VERBOSE. r=froydnj 2015-06-01 14:31:00 -07:00
Eric Rahm
a703d6cf7e Bug 1165515 - Part 4: Add PR_LOG_INFO. r=froydnj
This is an interstitial step in preparation for adding a new info level. For
now it just maps to debug.
2015-06-01 14:31:00 -07:00
Eric Rahm
f3d3953559 Bug 1165515 - Part 2: Add MOZ_LOG_TEST. r=froydnj 2015-06-01 14:30:59 -07:00
Botond Ballo
a1ee749697 Bug 1163320 - Variadic implementation of nsRunnableMethodArguments. r=froydnj
--HG--
extra : source : ed761807105b30069d5a7412f8dacf75429eeeb6
2015-05-11 17:24:21 -04:00
Nicholas Nethercote
249958c03d Bug 1168007 (part 1) - Add PLDHashTable::{Clear,ClearAndPrepareForLength}(). r=froydnj.
--HG--
extra : rebase_source : 05445de53b178173bfbaed29095e0ca4c11639a2
2015-05-18 19:16:06 -07:00
Birunthan Mohanathas
6898a39a46 Bug 1165729 - Remove unnecessary template declaration for fallible nsTArray::AppendElement. r=froydnj 2015-05-28 11:07:43 -07:00
Nick Fitzgerald
1bd1513bea Bug 1024774 - Part 9: Deserialize heap snapshots; r=jimb 2015-05-28 07:37:43 -07:00
Michael Layzell
2869617276 Bug 1167375 - make nsTWeakRef use a nsRefPtr internally. r=nfroyd
--HG--
extra : rebase_source : e06ab164cdb3b1eb2cf94b8b0edac14084866970
2015-05-21 14:02:00 +02:00
Mike Hommey
ea7750bcb1 Bug 991983 - Define SOURCES as SourcePath. r=gps 2015-05-28 07:34:15 +09:00
Mike Hommey
188ce081ec Bug 991983 - Emit absolute paths for UnifiedSources. r=gps
This helps upcoming changes, and relieves backends from path resolution.
This has the side effect of chaning the order of some unified sources,
which consequently breaks nsTextFormatter because it declares snprintf
methods after nsStringAPI #defines it.
2015-05-28 07:34:11 +09:00
Botond Ballo
2e2a504271 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : source : 7468f9a3aa03520a29e138d4df431f0b5d90967c
2015-05-26 14:33:55 -04:00
Nicholas Nethercote
6c4f582c73 Bug 1168027 - Use PLDHashTable2 in nsTHashtable. r=froydnj.
The added static_casts will be removed when PLDHashTable and PLDHashTable2 are
merged.

--HG--
extra : rebase_source : 49dacef8a86adc088610449b6bd2ef9345af5a84
2015-05-12 17:33:49 -07:00
Phil Ringnalda
49dd872168 Back out 3 changesets (bug 1119980) for emulator-l bustage
CLOSED TREE

Backed out changeset 12ce98475c6e (bug 1119980)
Backed out changeset bdb8d05f8870 (bug 1119980)
Backed out changeset a68a18840492 (bug 1119980)
2015-05-25 18:48:51 -07:00
Botond Ballo
9934d127c1 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : rebase_source : 4e915a12ba662ed45788238a5f0a45533888bd92
2015-05-25 20:45:17 -04:00
Cervantes Yu
55152ad9d9 Backout change 39e167bbd14c, a80140872ea5, adae9be2294d and b71ccef9c674 (bug 970307). 2015-05-19 14:31:25 +08:00
Andrew McCreight
e32a66ebb3 Bug 1166488 - Eliminate ServiceWorkerRegistrationBase::mCCDummy. r=smaug 2015-05-20 09:55:07 -07:00
Eric Rahm
4879ae86f4 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Eric Rahm
c60f772f62 Bug 1165518 - Part 1: Add Logging.h. r=froydnj 2015-05-19 11:15:32 -07:00
Nicholas Nethercote
fe7dc5bdde Bug 1165786 - Remove PLDHashTable::SetOps(). r=froydnj.
--HG--
extra : rebase_source : 489edddf7e2c4669cb74555d60b851aed6e35d78
2015-05-18 00:52:08 -07:00
Nicholas Nethercote
c1d4a47622 Bug 1165770 - Add PLDHashTable2. r=froydnj.
This is a temporary sub-class of PLDHashTable that will allow PLDHashTable to
be incrementally transitioned from manual initialization/finalization (via
explicit Init()/Fini() calls) to automatic initialization/finalization (via an
initializing constructor and a destructor). Once all PLDHashTable instances are
converted to PLDHashTable2, it can be folded back into PLDHashTable and the "2"
suffix can be dropped.

--HG--
extra : rebase_source : 674e7bd9320dc1db8879f842df05a7d995069e97
2015-05-18 00:52:01 -07:00
Birunthan Mohanathas
602c769540 Bug 968520 - Add fallible variants of nsTArray::AppendElement. r=froydnj 2015-05-18 13:50:35 -07:00
Birunthan Mohanathas
538dcc1d39 Bug 968520 - Add fallible variants of nsTArray::AppendElements. r=froydnj 2015-05-18 13:50:35 -07:00
Birunthan Mohanathas
c35f90a82e Bug 968520 - Add fallible variants of nsTArray::InsertElementAt. r=froydnj 2015-05-18 13:50:35 -07:00
Birunthan Mohanathas
71f1f00db4 Bug 968520 - Add fallible variants of nsTArray::ReplaceElementsAt. r=froydnj 2015-05-18 13:50:35 -07:00
Birunthan Mohanathas
0be91f1f80 Bug 968520 - Add fallible variant of nsTArray::SetLength. r=froydnj 2015-05-18 13:50:34 -07:00
Birunthan Mohanathas
3e5856c6c0 Bug 968520 - Add fallible variant of nsTArray::EnsureLengthAtLeast. r=froydnj 2015-05-18 13:50:34 -07:00
Birunthan Mohanathas
46db3a10bb Bug 968520 - Add fallible variants of nsTArray::InsertElementsAt. r=froydnj 2015-05-18 13:50:34 -07:00
Birunthan Mohanathas
57b1194dc2 Bug 968520 - Add fallible variant of nsTArray::SetCapacity. r=froydnj 2015-05-18 13:50:34 -07:00
Birunthan Mohanathas
ed7aa96d0a Bug 968520 - Explicitly specify the allocator for nsTArray_base functions. r=froydnj 2015-05-18 13:50:34 -07:00
Gerald Squelart
5847857dc8 Bug 1153295 - Unit tests. r=nfroyd 2015-04-27 18:40:00 -04:00
Gerald Squelart
2b1b8b1729 Bug 1153295 - Select StorensRefPtrPassPtr for types with AddRef and Release methods. r=nfroyd 2015-04-26 04:52:00 -04:00
Gerald Squelart
f330df40d4 Bug 1153295 - Add mozilla::Declval. r=nfroyd 2015-04-27 18:11:00 -04:00
Nicholas Nethercote
a369149681 Bug 1165206 - Tweak nsTHashtable's move constructor. r=froydnj.
The SetOps() call is no longer necessary now that PLDHashTable has a move
constructor.

This change originally landed in one of the patches from bug 1161377, which was
subsequently backed out.
2015-05-15 20:06:03 -07:00
Nicholas Nethercote
eab9ff6d25 Back out all four patches from bug 1161377. r=me.
Due to Android startup regressions (bug 1163066) and plugin crashes (bug
1165155).

--HG--
extra : rebase_source : 380f79e67dff4c4eaa2614f286a4d0669666b652
2015-05-14 21:48:43 -07:00
Ganesh Sahukari
b5a3345900 Bug 1155643 - Removed nsIDebug.idl, moved methods of nsIDebug to nsIDebug2. r=paolo 2015-05-07 10:58:37 +05:30
Mike Hommey
c917606f95 Bug 1043692 - Move DIST_INSTALL to moz.build. r=gps 2015-05-12 07:55:22 +09:00
Mike Hommey
8a1bd09c71 Bug 1162779 - Move NO_EXPAND_LIBS to moz.build. r=mshal 2015-05-12 07:26:42 +09:00
Steve Fink
087775cc19 Bug 1162310 - Do not use nonexistent macro when XGILL_PLUGIN is defined, r=bhackett
--HG--
extra : rebase_source : 9c9942690f4942d94ae0222168be7e00a352dc69
2015-05-07 09:49:41 -07:00
Nicholas Nethercote
77943547dc Bug 1161377 (part 2) - Remove PL_NewDHashTable() and PL_DHashTableDestroy(). r=froydnj.
They're not needed now that there is an initializing constructor and a
destructor.
2015-05-04 22:59:24 -07:00
Nicholas Nethercote
7c500c6bcc Bug 1161377 (part 1) - Add an initializing constructor and destructor to PLDHashTable. r=froydnj.
The destructor is "opt-in" -- there's a flag that makes it a no-op unless the
table was initialized with the initializing constructor. This will allow us to
incrementally convert existing tables from manual to automatic
initialization/finalization. This is important because some of the existing
uses are tricky (impossible?) to convert to the automatic style.
2015-05-04 22:59:02 -07:00
Birunthan Mohanathas
92a2adb3e6 Bug 819090 - Remove nsVoidArray.{cpp,h}. r=froydnj 2015-05-06 10:57:41 -07:00
Nicholas Nethercote
db496a806e Bug 1160436 - Fix PLDHashTable::operator=. r=froydnj.
This fixes the following problems with PLDHashTable::operator=:

- It doesn't handle self-assigments.

- It leaks the memory used by the assigned-to table.

- It doesn't leave the assigned-from table in a safely destructable state.

--HG--
extra : rebase_source : 433ac3418c00e3bb6d376982e4c679d27e42a377
2015-05-03 17:04:07 -07:00
Nicholas Nethercote
c8ff2d51c8 Bug 1159972 - Remove the fallible version of PL_DHashTableInit(). r=froydnj.
It's no longer needed now that entry storage isn't allocated there. (The other
possible causes of failures in that function are less interesting and simply
crashing is a reasonable thing to do for them.)

This also makes PL_DNewHashTable() infallible, so I removed some
now-unnecessary checks of its result.

--HG--
extra : rebase_source : 4c6ab0c449bc18e8bace8bf036b5bd78d3a2f1c4
2015-04-29 16:38:29 -07:00
Nathan Froyd
a494081079 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
Nathan Froyd
73b20a0500 Bug 1159304 - silence Coverity warning about implicit conversion issues in ReadAheadLib; r=erahm 2015-04-28 12:10:37 -04:00
Nathan Froyd
265eedb594 Bug 1159302 - handle ftell errors in nsINIParser::InitFromFile; r=erahm 2015-04-28 12:09:31 -04:00
Matt Woodrow
18b4767b02 Bug 1156966 - Avoid writing 0's to mEmptyHdr in nsTArray since it triggers TSan warnings. r=nfroyd
--HG--
extra : rebase_source : b6e69723f378d73dc74c301b077618aaafda905a
2015-04-28 17:57:15 +12:00
Nathan Froyd
44bbcc3afa Bug 1158772 - fix non-idiomatic memset call in nsDeque.cpp; r=erahm
Coverty complains that we're using sizeof(mData) here instead of
sizeof(*mData).  They're equivalent for all the architectures we care about,
but go ahead and tidy up the syntax to silence the static analyzer.
2015-04-27 07:55:32 -04:00
Cervantes Yu
4f02100ffd Backed out 2 changesets (bug 1138620)
Backed out changeset e60b4b01c05d (bug 1138620)
Backed out changeset 52d49dd25d6d (bug 1138620)
2015-04-24 15:05:44 +08:00
Jan de Mooij
103a223716 Bug 1155946 part 1 - Add a mayResolve class hook to optimize objects with resolve hooks better. r=bhackett 2015-04-23 15:51:28 +02:00