James Cheng
23b7d3da85
Bug 1212745 - Part 1 - operator() Use perfect forwarding to avoid redundant copy. r=nfroyd
2015-10-08 11:38:00 +02:00
James Cheng
bf740b75f1
Bug 1212745 - Part 1 - Make mozilla::Function support pointer to member function. r=nfroyd
2015-10-11 19:53:00 +02:00
Jim Blandy
cd209ab0b5
Bug 1206357: Add mfbt/FastBernoulliTrial.h, implementing efficient random sampling. r=waldo
...
--HG--
extra : rebase_source : 63de57cd3fb3317c752f58fb7a0a71f050f198a3
2015-10-08 13:05:31 -07:00
Michael Layzell
a764ebee57
Bug 1211979 - Annotate crashes triggered by MOZ_RELEASE_ASSERT, r=froydnj
2015-10-08 17:50:58 -04:00
Michael Layzell
e4681ea6a5
Bug 1183355 - Annotate crash reports triggered by MOZ_CRASH in release builds, r=froydnj
2015-10-08 10:01:08 -04:00
Jon Coppeard
5ea571ddb7
Bug 1211100 - Add Vector::infallibleEmplaceBack and use it in JSScript::initScriptCounts() r=nbp
...
--HG--
extra : rebase_source : a989ddba0bc981725a955c705a51aa495ef59ab9
2015-10-06 14:50:49 +01:00
Chris Peterson
0c816bee5c
Bug 1208357 - Fix -Wshadow warnings in mfbt/decimal. r=Ms2ger sr=Waldo
2015-09-22 20:43:29 -07:00
Jon Coppeard
204777d13d
Bug 1207519 - Prevent HashTable shrink from ignoring allocation failures that may have been reported r=Waldo
2015-09-30 11:34:49 +01:00
Jon Coppeard
1ae90ca7ba
Bug 1200642 - Add OOM simulation to Vector r=Waldo
2015-09-30 11:34:48 +01:00
Jon Coppeard
0b41e069f3
Bug 1200642 - Add checkSimulatedOOM() to AllocPolicy r=Waldo
2015-09-30 11:34:44 +01:00
Wes Kocher
0eeafe1fa4
Merge inbound to central, a=merge
2015-09-24 16:46:34 -07:00
Jared Wein
71808b231d
Bug 1205020 - Disable optimizations in TestTuple.cpp since it breaks the build on VS2013 Windows 10. r=froydnj
...
--HG--
extra : rebase_source : f209cc4dd8051562a4ef87313d0636f9dbee2132
2015-09-23 13:53:07 -04:00
Olli Pettay
e91dae783c
Bug 1204669 optimize out hashtable lookups caused by extra GetPrototypeBinding call, r=bz,waldo
2015-09-24 03:53:31 +03:00
Nathan Froyd
50eb249b57
Bug 1207245 - part 2 - move MakeAndAddRef to nsRefPtr.h
...
A number of places depend on RefPtr.h providing this function. When we
s/RefPtr/nsRefPtr/, such places still need to be able to see this
function. Moving it to nsRefPtr.h makes it still visible before we
switch (since RefPtr.h includes nsRefPtr.h), and after we switch (since
every place that #includes RefPtr.h will now be #including nsRefPtr.h).
2015-09-22 22:23:10 -04:00
Nathan Froyd
5761751aa3
Bug 1207245 - part 1 - move RefCounted<T> to its own file
...
Various bits depend on RefPtr.h to provide RefCounted<T> and RefPtr<T>.
It will be easier to manage an automatic conversion from RefPtr<T> to
nsRefPtr<T> if we split out the dependency on RefCounted<T> first.
2015-09-22 21:27:34 -04:00
Nathan Froyd
d3552d7e39
Bug 1207245 - part 0 - fix why-did-we-allow-that tests in TestRefPtr.cpp
...
RefPtr.h's byref permits callees to see the incoming value of the
outparam; XPCOM's getter_AddRefs zeros outparams prior to the call, so
information doesn't leak through inadvertently. Given this difference,
we need to eliminate tests that depended on this (arguably dangerous)
behavior. The numerous assertion fixups are required because we're
removing construction and destruction of objects along the way.
2015-09-23 23:07:29 -04:00
Jim Blandy
e1252e4e42
Bug 1206356: Add mfbt/Random.h, implementing the xorshift128+ random number generator. r=waldo
...
--HG--
extra : rebase_source : 3eb009156765b341e6a2dcee9f0287ce198c439f
2015-09-23 13:59:28 -07:00
Phil Ringnalda
dba9d5afc5
Back out 835853a88b03 (bug 1206356) for at least Android/B2G bustage
...
CLOSED TREE
2015-09-22 18:21:32 -07:00
Jim Blandy
68cb70e9c4
Bug 1206356: Add mfbt/Random.h, implementing the xorshift128+ random number generator. r=waldo
...
--HG--
extra : rebase_source : 8694eae8a75a1b56be81826e3d9567d33a9fcdfe
2015-09-22 16:34:51 -07:00
James Cheng
48d19920cb
Bug 1204790 - Prefer deleted function with public access specifiers instead of private in UniquePtr. r=nfroyd
...
--HG--
extra : rebase_source : 9f711462c2e0b9865793c9f4846cb7ab6a60ef32
2015-09-15 19:18:00 +02: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
Andrew McCreight
c1e26ee03e
Bug 1203314 - Make operator<< a method on unused_t. r=froydnj
...
This prevents operator overload resolution from failing when this file
is included in a file that uses Chromium IPC logging.
--HG--
extra : rebase_source : 661efe98060d405e87f828655b13c0c0a8a428e0
2015-09-10 13:17:00 +02: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
2c245dc4e2
Bug 1201190 - Part 2: Add MOZ_NON_TEMPORARY_CLASS and MOZ_RAII to mfbt, r=ehsan
2015-09-12 16:53:32 -04:00
Michael Layzell
1eaae658aa
Bug 1156802 - Part 2: Remove all explicit move constructors, r=ehsan
2015-09-12 12:34:45 -04:00
Botond Ballo
78627e8b5d
Bug 1198451 - Tests for mozilla::Function. r=froydnj
...
--HG--
extra : source : 11a2cd3e5c1e051c6bef843b45fe3701364e826a
2015-09-06 21:43:34 -04:00
Botond Ballo
9985fe899c
Bug 1198451 - Add a type-erased callable wrapper, mozilla::Function, to MFBT. r=froydnj
...
--HG--
extra : source : 90ac08992195f6e818a83019567e55e17a350901
2015-09-11 14:40:09 -04:00
Chris Peterson
a037228e4f
Bug 1202568 - Cherry-pick warning fixes from upstream double-conversion. r=Ms2ger
...
--HG--
extra : rebase_source : 732eec4f5748b54e42a23267b2023b303f213983
2015-09-05 00:38:04 -07:00
Nicholas Nethercote
b5bc43ef27
Bug 1202965 (part 1) - Add MOZ_UNUSED. r=froydnj.
2015-09-09 17:01:28 -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
Robert O'Callahan
5d455e0375
Bug 1202317. Support PodEqual over fixed-length arrays. r=Waldo
...
--HG--
extra : commitid : CojJ669FPWd
extra : rebase_source : fd81c9367dcb9dacf9e5ba137fe9a4ef31a5853e
2015-09-07 17:07:59 +12:00
Jeff Gilbert
f9055a2c4d
Bug 1193600 - Add Clamp and IsPowerOfTwo to MFBT. - r=waldo
2015-09-04 13:33:10 -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
Kan-Ru Chen
2c0adde7a0
Bug 1199068 - Soothe a unused variable warning in TestSplayTree.cpp. r=nfroyd
2015-08-28 11:24:47 +08:00
Makoto Kato
99df3288e2
Bug 1197734 - Add MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES on VS2015+. r=Waldo
2015-08-25 16:53:25 +09:00
Mike Hommey
672db6ba31
Bug 1189967 - Avoid including <string> from Char16.h. r=nfroyd
...
Since Char16.h is included everywhere, and MSVC 2015 uses the char16ptr_t trick
it contains, we include <string> everywhere, but that has the side effect of
breaking the build in subtle ways. One way around this would be to avoid including
Char16.h in the first place, but that requires more work than I was ready to put
in. So instead, just avoid including <string> by removing the conversion operator
for std::wstring.
2015-08-23 22:20:33 +09:00
Xidorn Quan
24406b034a
Bug 1189655 - Define MOZ_HAVE_CXX11_CONSTEXPR on VS2015 or later. r=Waldo
...
--HG--
extra : source : c3fa493499954504073d8abeb7104f46c4f3f953
2015-08-21 09:17:18 +10:00
Nathan Froyd
c3c08f5b75
Bug 1196451 - tweak comment in nsRefPtr.h to be more clear; r=botond
...
DONTBUILD because this is a comment-only fix.
2015-08-20 00:59:28 -04:00
Xidorn Quan
9602783f5f
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
0005d3bf06
Backed out changeset 20c6f74296e2 (bug 1195154) for causing Bug 1196115
...
--HG--
extra : rebase_source : 59356f3ff488b4000e4f3034f9c676d4afe8b49f
2015-08-19 20:43:11 +05:30
Xidorn Quan
aedc156767
Bug 1195154 - Replace operator overloads for comparing nsRefPtr to 0 with those for comparing to nullptr. r=froydnj
...
--HG--
extra : source : 3303e551336985eca8b501dcc12cf6f2dddbdec3
2015-08-19 09:09:08 +10:00
Michael Layzell
f8b012d537
Bug 1192130 - Part 2: Use MOZ_NON_AUTOABLE to validate the usage of already_AddRefed, r=ehsan
2015-08-14 17:33:54 -04:00
Aryeh Gregor
328b8f083b
Bug 1193298 - Part 3: Delete RefPtr<T>::operator T*()&&. r=froydnj
...
I put MOZ_HAVE_REF_QUALIFIERS in Attributes.h for lack of a better
place. I didn't especially want to make a whole new file for it.
To make the tree compile, support for moving RefPtr to nsRefPtr was
needed. I chose to put the definitions in RefPtr.h instead of
nsRefPtr.h because RefPtr.h looks to be included in fewer files, so I
preferred to bloat fewer files with the extra include.
For some reason operator!() wasn't necessary here, although it seems it
is for nsRefPtr.
2015-08-11 06:45:00 -04:00
Aryeh Gregor
d587425b77
Bug 1179451 - Part 5: Delete nsRefPtr<T>::operator T*()&&. r=froydnj
...
--HG--
extra : rebase_source : 9e1680bb0eb7c38de14cd1974fbd03988780a3bc
2015-08-13 15:22:48 +03:00
Nathan Froyd
5fb19bf30c
Bug 1193005 - delete unused function nsRefPtr::begin_assignment; r=erahm
...
We don't use it; the getter_AddRefs overload for nsRefPtr uses
StartAssignment, which is the same thing.
2015-08-11 00:23:33 -04:00
Michael Layzell
c3a87d5439
Bug 885515 - Part 2: Add MOZ_HEAP_CLASS to mfbt, r=ehsan
2015-08-09 12:42:11 -04:00
Nick Fitzgerald
26eaf483ae
Bug 1186693 - Add exhaustive matching to mozilla::Variant; r=Waldo
2015-08-08 16:43:35 -07:00
Nathan Froyd
78b4b30d08
Bug 1189894 - remove Atomics.h IntrinsicAddSub hack; r=erahm
...
This hack was only required for broken headers in GCC 4.6. Since we
only support GCC 4.7+ now, this hack is no longer necessary.
2015-07-31 22:25:21 -04:00
Botond Ballo
1ad5e05028
Bug 1056356 - Add support for nsRefPtr<const T>. r=froydnj
...
--HG--
extra : rebase_source : 7b86c6e7bc47c7b3ebc19075559cf0f7d24ededf
2015-08-05 13:52:06 -04:00