Commit Graph

934 Commits

Author SHA1 Message Date
Jeff Walden
fd24736170 Add an assertion message to the assert-is-empty in LinkedList::~LinkedList, to indicate to users who hit it that it's the fault of the caller, not the fault of MFBT code. No bug, rs=froydnj 2016-02-16 13:06:20 -08:00
Mats Palmgren
489f6ff1de Bug 1216001 part 1 - Optimize nsRange::IsNodeSelected. r=bz 2016-02-13 18:40:23 +01:00
Nick Fitzgerald
43611a34a5 Bug 1247412 - Add a reverse method to mozilla::Vector; r=Waldo 2016-02-11 08:33:00 +01:00
Chris Peterson
a8072ba663 Bug 1247535 - Fix -Wunreachable-code warning in mfbt/Poison.cpp. r=froydnj
mfbt/Poison.cpp:165:26: warning: will never be executed [-Wunreachable-code]
2016-02-10 22:09:53 -08:00
Phil Ringnalda
ca73975f7f Back out 3 changesets (bug 1216001) for Win8 reftest failures in 1193519-sideways-lr-3.html and 1193519-sideways-lr-4.html and intermittent OS X failures in font-display-2.html
CLOSED TREE

Backed out changeset dbadb8fe5803 (bug 1216001)
Backed out changeset a30593ebd58e (bug 1216001)
Backed out changeset c1646ffa71b4 (bug 1216001)
2016-02-11 20:43:41 -08:00
Mats Palmgren
dc4bb6c5e8 Bug 1216001 part 1 - Optimize nsRange::IsNodeSelected. r=bz 2016-02-12 02:13:57 +01:00
Jon Coppeard
55dbf8e89c Bug 1242812 - Only check for simulated OOM in vectors when growing beyond reserved size r=Waldo 2016-02-11 19:00:18 +00:00
Nathan Froyd
57c59afe5a Bug 1247338 - really make Atomic's constructor constexpr; r=Waldo
Atomic's constructor is marked as constexpr, but it calls a
non-constexpr function, ToStorageTypeArgument::convert.  For compilers
which require constexpr-ness on constructors to inline away the actual
constructor call, the call to ToStorageTypeArgument::convert completely
disables the constexpr-ness of the constructor.  Let's fix this by
marking all relevant instances of ToStorageTypeArgument::convert as
MOZ_CONSTEXPR, thus satisfying the compiler once again.
2016-02-10 11:28:36 -05:00
Ehsan Akhgari
84a0f038cf Bug 1232765 - Remove the workaround added in bug 1022050 2016-02-07 14:50:50 -05:00
Lee Salzman
9f646e6e6c Bug 1245979 - make mfbt Function reference-counted so that it can be cheaply copied for compatibility with Skia. r=froydnj 2016-02-04 16:43:42 -05:00
Thomas Zimmermann
fda4ea0ba7 Bug 1194721: Add |Saturate| template for saturation arithmetics, r=nfroyd
|Saturate<T>| implements saturation arithmetics for arbitrary basic
types. Operations on its value won't over- or underflow the type's
range.
2016-02-04 12:35:12 +01:00
Carsten "Tomcat" Book
0d206890d6 Backed out changeset 8d6c228ef008 (bug 1194721) on developers request 2016-02-03 16:25:00 +01:00
Thomas Zimmermann
9aaab24d3a Bug 1194721: Add |Saturate| template for saturation arithmetics, r=nfroyd
|Saturate<T>| implements saturation arithmetics for arbitrary basic
types. Operations on its value won't over- or underflow the type's
range.
2016-02-03 15:16:00 +01:00
Lee Salzman
41c61715b2 Bug 1243876 - fix ConvertibleTester to not cause incomplete type errors with UniquePtr and Skia. r=nfroyd 2016-01-28 16:08:27 -05:00
Xidorn Quan
137556e781 Bug 1241901 part 3 - Add IsMemberPointer and IsScalar type traits. r=froydnj 2016-01-30 10:33:41 +11:00
Morgan Phillips
8ac1cfe7d9 Bug 1238582 - Skip simulated OOM check in the case where we're growing within reserved space; r=Waldo 2016-01-28 10:07:14 -06:00
Ehsan Akhgari
eb68974351 Bug 1080968 - Don't use constexpr on clang-cl when emulating MSVC 2013
constexpr-ness of things can change the ABI requirements, and MSVC 2013
doesn't support constexpr, so choosing it for clang-cl when emulating
MSVC 2013 will cause ABI incomap issues between object files compiled
with the two compilers.

This reverts part of the commit for the original bug.
2016-01-27 21:10:03 -05:00
Tom Tromey
c35c86d248 Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07:00
Jan de Mooij
1ad69c0f15 Bug 1237201 part 8 - Make fallible Vector methods MOZ_WARN_UNUSED_RESULT. r=jwalden 2016-01-14 22:04:36 +01:00
Jim Blandy
2f3348f96d Bug 1239479: Add comments to mfbt/XorShift128PlusRNG.h from the RNG's designer. DONTBUILD r=Waldo 2016-01-13 12:46:40 -08:00
Chris Peterson
df63dbef87 Bug 1236413 - Suppress -Wimplicit-fallthrough warning in third-party code mfbt/decimal/. r=Waldo
mfbt/decimal/Decimal.cpp:762:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-11-24 23:12:44 -08:00
Brian Birtles
e4284550c0 Bug 1228641 - Rename begin/size to aBegin/aSize to avoid shadow warnings; r=botond
On B2G/Android we get warnings if the begin/size parameters to the constructor
match the method names begin()/size(): declaration of 'size/begin' shadows
a member of 'this'.
2016-01-13 07:54:53 +09:00
Andrea Marchesini
a2094fbf55 Bug 1231378 - part 3 - Fix uninitialized members of classes in modules/libjar and mfbt, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book
1b6f65f586 Backed out changeset 138c4e6a9b45 (bug 1231378) 2016-01-12 15:48:55 +01:00
Andrea Marchesini
2f2a80d82c Bug 1231378 - part 3 - Fix uninitialized members of classes in modules/libjar and mfbt, r=smaug 2016-01-12 13:57:34 +00:00
Michael Layzell
66ff47de76 Bug 1226376 - Part 1: Allow non-trivial constexpr constructors in MOZ_TRIVIAL_CTOR_DTOR classes, r=ehsan 2016-01-08 15:34:24 -05:00
Jeff Muizelaar
af079e4ea0 Bug 1228641. Add a polyfill of std::initializer_list. r=froydnj 2016-01-06 22:06:35 -05:00
Jan de Mooij
148517976d Bug 1231224 part 10 - Make various Vector calls check for OOM. r=terrence 2016-01-06 21:06:25 +01:00
Chris Peterson
82e23fb949 Bug 1235277 - Define MOZ_FALLTHROUGH_ASSERT to workaround -Wunreachable-code warnings about MOZ_FALLTHROUGH in debug builds. r=botond 2015-12-27 13:27:17 -07:00
Nathan Froyd
e11ccf6ab5 Bug 1232694 - fix typo in Compiler.h; r=botond 2015-12-15 11:14:53 -05:00
Nick Fitzgerald
4c67f636ce Bug 1170325 - Convert js::Vector into a template alias to mozilla::Vector with a single customized default argument. Also get rid of the CRTP support in mozilla::Vector (through mozilla::VectorBase) now that template aliasing is good enough, and make mozilla::Vector final so that people will use composition and not inheritance with it. (Inheritance plays poorly with movability and a few other things, in addition to messing up template argument deduction matching.) r=Waldo, patch sort of a tag-team between him and me 2015-07-13 12:42:52 -07:00
Chris Peterson
7f4c4d76a4 Bug 1228947 - Replace mfbt/Constants.h with math.h. r=roc 2015-11-27 20:49:55 -08:00
Xidorn Quan
f1c2e28909 Bug 1228182 - Use division directly for generating double in XorShift128PlusRNG. r=Waldo 2015-12-03 12:16:18 +11:00
Jan de Mooij
24e1c164eb Bug 322529 part 3 - Fix LRandom JIT code to use the new algorithm. r=arai,jwalden 2015-12-02 13:56:00 +01:00
Mike Hommey
547d572dd9 Bug 1229293 - Enforce order when setting a HierarchicalStringList, and forbid reassignment. r=gps
The current implementation of HierarchicalStringList allows the following:

   FOO.bar = [
       'foo',
       'bar',
   ]

while

   FOO.bar += [
       'foo',
       'bar',
   ]

would be invalid because of the StrictOrderingOnAppendList enforcement.

It also allows to overwrite the entire list with a subsequent

   FOO.bar = [
	'baz',
   ]

while we've explicitly forbidden such things for every other list.

While in the vicinity, fix HierarchicalStringList._get_export_variable to not
call the HierarchicalStringList constructor uselessly.
2015-12-02 11:04:37 +09:00
Mike Hommey
6dddb4e6f8 Bug 1178266 - Link against libatomic when necessary. r=froydnj 2015-12-02 11:04:37 +09:00
Botond Ballo
b1b05dcd90 Bug 1221680 - Avoid hard errors when testing convertibility using the IsConvertible type trait. r=froydnj 2015-11-06 17:47:36 -05:00
Bill McCloskey
086141208f Bug 1221368 - Change MakeTuple to decay the types of its arguments (r=froydnj) 2015-11-09 10:21:11 -08:00
Nathan Froyd
2258a5261d Bug 1216611 - add mozilla::MakeUniqueFallible and convert uses throughout the tree; r=Waldo 2015-11-05 16:24:24 -05:00
Sean Stangl
24e061fa5a Bug 939157 - RotateLeft with shift of zero gives undefined behavior. r=Waldo 2015-11-03 14:25:48 -08:00
Jeff Walden
5000852e29 Bug 1220693 - Make mozilla::Atomic<enum class> work even on compilers that don't have <atomic>. r=froydnj 2015-11-03 13:03:26 -08:00
Markus Stange
4fefc7082b Bug 1201330 - Keep scroll handler induced layer activity active until the scroll frame becomes inactive. r=roc 2015-10-30 16:28:53 +01:00
Birunthan Mohanathas
94998cf5fe Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Mike Hommey
e99b640fef Backout changeset 3ced6f84960c (bug 1178266) because it was not reviewed by a peer and isn't a complete fix. 2015-10-31 07:36:49 +09:00
Carsten "Tomcat" Book
4bfbe87ad2 Backed out changeset d5d68c0258f3 (bug 1201330) 2015-10-30 14:44:06 +01:00
Markus Stange
c38bf4f8c7 Bug 1201330 - Keep scroll handler induced layer activity active until the scroll frame becomes inactive. r=roc 2015-10-27 17:18:03 +01:00
Mike Hommey
70a44929a9 Bug 1178266 - Link against libatomic when necessary r=huangwenjun06
---
 build/autoconf/toolchain.m4 | 26 ++++++++++++++++++++++++++
 mfbt/moz.build              |  3 +++
 2 files changed, 29 insertions(+)
2015-10-29 22:19:35 +08:00
L. David Baron
0d9a430784 Bug 1214958 - Add operators &=, |=, and ^= to mozilla::DebugOnly. r=froydnj 2015-10-19 20:42:28 -07:00
Cameron McCormack
e55561d84e Bug 1216041 - Add ranged iterator support to mozilla::{Array,RangedArray,EnumerationArray}. r=froydnj 2015-10-20 10:16:20 +11:00
Cameron McCormack
c0513349d0 Bug 1216040 - Make ArrayLength support mozilla::EnumeratedArray. r=froydnj 2015-10-20 10:16:20 +11:00