Commit Graph

796 Commits

Author SHA1 Message Date
Nicholas Nethercote
69d088e45f 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.
2015-08-27 20:44:53 -07:00
Honza Bambas
f8b11fece7 Bug 1188983 - mozilla::Tokenizer improvements, r=nfroyd 2015-08-19 15:14:25 -07:00
Xidorn Quan
539c5ebd2f Bug 1195154 - Replace operator overloads for comparing nsRefPtr to 0 with those for comparing to nullptr. r=froydnj 2015-08-19 11:06:05 -07:00
Nigel Babu
134dcc51bf Backed out changeset 20c6f74296e2 (bug 1195154) for causing Bug 1196115 2015-08-19 20:43:11 +05:30
Xidorn Quan
0d959e07a3 Bug 1195154 - Replace operator overloads for comparing nsRefPtr to 0 with those for comparing to nullptr. r=froydnj 2015-08-19 09:09:08 +10:00
Nicholas Nethercote
6a0cbc501c Bug 1190735 - Remove nsITimer.TYPE_REPEATING_PRECISE. r=froydnj. 2015-08-04 17:30:53 -07:00
Botond Ballo
0369104893 Bug 1056356 - Add support for nsRefPtr<const T>. r=froydnj 2015-08-05 13:52:06 -04:00
James Cheng
d4c8522d1e Bug 1189231 - Impl operator->* to nsAutoPtr. r=nfroyd 2015-07-30 21:02:00 -04:00
Nicholas Nethercote
8bc2be4de1 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.
2015-07-29 22:28:20 -07:00
James Cheng
973c50a883 Bug 975246 - Part2- Test Invoking via operator->*. r=nfroyd 2015-07-29 02:52:00 +02:00
Byron Campen [:bwc]
85218cb3b2 Bug 1059572 - Part 0.5: Fixes for pre-existing problems in TestTimers. r=nfroyd 2015-07-29 11:43:40 -05:00
Byron Campen [:bwc]
b9b7f9420c Bug 1059572 - Part 0: Fuzz test for timers. r=nfroyd 2015-07-29 11:16:14 -05:00
Bobby Holley
59c4d9cf6c Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Honza Bambas
07fc6c3685 Bug 1024056 - Simple ASCII lexical analyzer. r=nfroyd 2015-07-27 05:07:00 -04:00
Nicholas Nethercote
b51a99e1d5 Bug 1181443 (part 2) - Use nsTHashtable::Iterator in TestHashtables.cpp. r=froydnj. 2015-07-23 02:36:13 -07:00
Birunthan Mohanathas
94c853eedb Bug 1185589 - Properly handle self-assignment in nsTArray::operator=. r=mccr8 2015-07-21 09:42:58 -07:00
Nicholas Nethercote
aefb809e48 Bug 1185399 (part 1) - Remove macros from pldhash.h. r=froydnj. 2015-07-20 17:06:38 -07:00
Birunthan Mohanathas
47ed3a3675 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
Nicholas Nethercote
047ce23ad8 Bug 1181411 - Test some expected aborts in PLDHashTable. r=glandium. 2015-07-12 18:50:21 -07:00
Nicholas Nethercote
fb8b6912c9 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
2663e88cb7 Bug 1180084 - Convert TestPLDHash.cpp to a gtest. r=froydnj.
The switch to unsigned integer constants (e.g. "0u") are necessary to avoid
compiler warnings about signed/unsigned comparisons.
2015-07-07 17:54:03 -07:00
Birunthan Mohanathas
c4d6688187 Bug 968520 - Add nsTArray::Assign. r=froydnj 2015-07-07 11:27:03 -07:00
Dragana Damjanovic
e3003eee82 Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Nicholas Nethercote
c14afde851 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.
2015-07-05 17:49:44 -07:00
Ryan VanderMeulen
ef4314a212 Backed out changeset 37bee149c935 (bug 968520) for checktest failures. 2015-06-30 15:47:18 -04:00
Birunthan Mohanathas
97d4c2d5ec Bug 968520 - Add nsTArray::Assign. r=froydnj 2015-06-30 11:16:03 -07:00
Nicholas Nethercote
ff52c090ad Bug 1176163 - Remove remaining uses of PL_DHashTableEnumerate() from xpcom/. r=froydnj. 2015-06-18 18:09:37 -07:00
Ryan VanderMeulen
db3fcf8fe5 Bug 704368 - Re-enable test_nsIProcess_stress.js on Linux64 debug. 2015-06-18 11:28:51 -04:00
Nicholas Nethercote
a2d83b8f85 Bug 1173600 (part 3) - Add PLDHashTable::RemovingIterator. r=froydnj. 2015-06-10 17:04:07 -07:00
Nicholas Nethercote
b945b71cfa 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
2015-06-11 21:19:53 -07:00
Birunthan Mohanathas
3959b83c21 Bug 968520 - Add mozilla::fallible to FallibleArray calls in tests. r=froydnj 2015-06-08 13:39:49 -07:00
Nikhil Marathe
080cf2090c Bug 1166504 - Make nsMultiplexInputStream cloneable. r=bkelly,froydnj 2015-06-02 16:12:57 -07:00
Nicholas Nethercote
57d9ca6f4a 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
662f90fecb Bug 1170416 (part 3) - Remove the PLDHashTable2 typedef. r=froydnj. 2015-05-19 16:46:17 -07:00
Nicholas Nethercote
97f24061f9 Bug 1168007 (part 11) - Use PLDHashTable2 exclusively in TestPLDHash. r=froydnj. 2015-05-18 21:58:33 -07:00
Wes Kocher
6f22942c7a Backed out changeset 47a103414177 (bug 1166504) for mochitest-e10s-4 permafail CLOSED TREE 2015-06-01 17:59:17 -07:00
Nikhil Marathe
183af7f394 Bug 1166504 - Make nsMultiplexInputStream cloneable. r=bkelly,froydnj 2015-05-19 14:28:32 -07:00
Nicholas Nethercote
f7e35f3076 Bug 1168007 (part 1) - Add PLDHashTable::{Clear,ClearAndPrepareForLength}(). r=froydnj. 2015-05-18 19:16:06 -07:00
Nicholas Nethercote
5717606138 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.
2015-05-18 00:52:01 -07:00
Nicholas Nethercote
972275ed2b Back out all four patches from bug 1161377. r=me.
Due to Android startup regressions (bug 1163066) and plugin crashes (bug
1165155).
2015-05-14 21:48:43 -07:00
Brian O'Keefe
f21be4ff50 Bug 924187 - Deal with interfaces.manifest from the backend. r=mshal 2015-02-13 08:11:57 -05:00
Nicholas Nethercote
058f304862 Bug 1161377 (part 3, attempt 2) - Convert some easy PL_DHashTable{Init,Finish} cases. r=froydnj. 2015-05-12 17:33:26 -07:00
Mike Hommey
23fb4c1447 Bug 1043692 - Add a DIST_INSTALL variable to moz.build, and replace NO_DIST_INSTALL with it. r=gps 2015-05-12 07:55:21 +09:00
Nicholas Nethercote
972e6dd284 Backout c375efe78e07 (bug 1161377 part 3) for (probably) increasing the static constructor count and regressing Fennec start-up time. r=me. 2015-05-10 22:16:18 -07:00
JW Wang
92783ac3a1 Bug 1161405. Part 2 - test case for parallelism of the thread pool. r=nfroyd. 2015-05-09 07:32:27 +08:00
Nicholas Nethercote
2ddb2e8069 Bug 1161377 (part 3) - Convert some easy PL_DHashTable{Init,Finish} cases. r=froydnj.
This patch converts easy cases, i.e. where the PL_DHashTableInit() call occurs
in a constructor and the PL_DHashTableFinish() call occurs in a destructor.
2015-05-04 22:59:24 -07:00
Nicholas Nethercote
7b2a571fc7 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
a58752105d 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.
2015-05-03 17:04:07 -07:00
Ehsan Akhgari
2c4f532160 Bug 1161240 - Make sure that NS_CloneInputStream correctly deals with null input; r=froydnj 2015-05-05 09:56:47 -04:00
Benjamin Smedberg
758e6c3dc9 Bug 1159737 Stop supporting binary XPCOM components except built into the application. r=froydnj sr=bz Some xpcshell tests of binary functionality need to register binary components. Expose a function "registerAppManifest" in the xpcshell environment to make this available to tests without exposing it to addons. r=bholley 2015-05-01 10:23:44 -04:00