Commit Graph

1137 Commits

Author SHA1 Message Date
Jon Coppeard
b0359cb30b Bug 1266404 - Allow construction of an EnumSet<T> using an initializer list r=Waldo 2016-04-28 14:25:05 +01:00
Jon Coppeard
7dd2771dd7 Bug 1266402 - Add iteration to EnumSet<T> so that it can be used in range-based for loops r=Waldo 2016-04-28 14:25:05 +01:00
Dan Gohman
592be23acb Bug 1265892 - Change Vector to use Impl::new_ consistently. r=Waldo 2016-04-26 16:26:17 -07:00
Jon Coppeard
99cbfbd0dc Bug 1259021 - Add Vector::extractRawBuffer method that doesn't copy the buffer r=Waldo 2016-04-25 13:41:25 +01:00
Jon Coppeard
d5b6a661f0 Bug 1259021 - Rename Vector::extractRawBuffer to extractOrCopyRawBuffer r=Waldo 2016-04-25 13:41:25 +01:00
Chris Peterson
1999c10d91 Bug 1266294 - Remove unnecessary compiler version checks for gcc <= 4.8.0 in mfbt. r=froydnj 2016-04-17 17:08:10 -07:00
Ehsan Akhgari
575dbe7dfd Bug 1264827 - Part 3: Add the MOZ_NEEDS_MEMMOVABLE_MEMBERS annotation to MFBT; r=froydnj 2016-04-18 15:43:48 -04:00
Carsten "Tomcat" Book
558930f4e9 Backed out changeset e673dbc9848f (bug 1232686) for breaking VS2013 Builds 2016-04-16 10:57:53 +02:00
Terrence Cole
2177cca5cd Bug 1232686 - Use decltype to infer Variant::match return type; r=fitzgen 2015-12-15 07:45:22 -08:00
Jan de Mooij
67e655e4bf Bug 1261361 - Make Vector::infallibleGrowByUninitialized check mReserved instead of mCapacity. r=Waldo
--HG--
extra : rebase_source : 2b6cdfae61946505b83748c016ef0b112ecf4780
2016-04-14 17:32:48 +02:00
Ralph Giles
8ed91454ea Bug 1262663 - Clean up UniquePtr return documentation. r=Waldo
The prohibition against returning a UniquePtr was based on
bugs in older compilers which required an explicit Move()
to properly transfer ownership. This is no longer the case
since we now have code returning this type directly.

--HG--
extra : rebase_source : 6190b3f14b650d448f18f7611a22576701657795
2016-04-11 14:36:29 -07:00
Lee Salzman
c9a80c9abd Bug 1263342 - don't use REFCOUNTED_VIRTUAL_TYPENAME for mfbt FunctionImplBase. r=froydnj 2016-04-08 23:14:59 -04:00
Lee Salzman
f1057b0380 Bug 1262577 - allow comparing mozilla::function with nullptr. r=froydnj 2016-04-06 15:18:01 -04:00
Terrence Cole
0ef3ab81a0 Bug 1232418 - Allow mozilla::Tuple to support equality comparison; r=Waldo
--HG--
extra : rebase_source : d57231f1c4a4c58715d2d552dd2e02257a73891e
2015-12-14 12:01:17 -08:00
Timothy Nikkel
6aeb6d5d05 Bug 1260247. In chaos mode randomly decide to start a new image load even if the image is in the image cache when allowed by spec. r=seth
If the image load is from the same document that cached the image we are required to use the cached version. Otherwise we should be free to ignore the cached version.
2016-04-02 13:53:12 -05:00
Bobby Holley
5790b832fa Bug 1261452 - do_AddRef shouldn't require an rvalue-reference. r=froydnj 2016-04-01 19:14:42 -07:00
David Keeler
9825c57bc3 bug 1239166 - platform work to support Microsoft Family Safety functionality r=froydnj,mgoodwin,mhowell,rbarnes,vladan
MozReview-Commit-ID: GhpJqJB97r9

--HG--
extra : rebase_source : e943c1e4d0f008ffd6b6bb4bb63e1daf27ae2c96
2016-01-12 15:39:43 -08:00
Jeff Walden
1dd8dbc3f7 Bug 1246061. r=jandem, r=bz, r=luke, r=froydnj
--HG--
extra : rebase_source : 5b314d4c4c6e0b553290884be7338f8e79c22f71
2016-03-09 00:37:20 -08:00
Markus Stange
04177e1aa2 Bug 1209100 - Back out bug 1165185 on inbound.
MozReview-Commit-ID: JqohyXNvjiU

--HG--
extra : rebase_source : c2165d279a6ca57a3439ebbfc081961369a42124
2016-03-21 16:16:52 -04:00
Mike Hommey
3fe18eae3b Bug 1175546 - Update GCC to 4.8.5 and bump minimum GCC version required to build. r=froydnj 2016-03-12 09:03:37 +09:00
Benoit Girard
52f227c58b Bug 1253678 - Rename mozilla::Function to mozilla::function. r=froydnj
MozReview-Commit-ID: 60RPmEsYDN2

--HG--
extra : rebase_source : 9d0bebc7362af2778d123425c56ac20553d9303b
2016-03-11 16:49:13 -05:00
Ehsan Akhgari
30ce323e87 Bug 1255857 - Allow mozilla::UniquePtr's deleter template argument to customize the pointer type; r=froydnj 2016-03-11 15:35:43 -05:00
Nick Fitzgerald
3508cf5f6a Bug 1254565 - Allow passing matchers as rvalues to Variant::match. r=froydnj
--HG--
extra : rebase_source : 9863e7cde9ff918af22de94ca7ec29988c154bbd
2016-03-10 13:35:00 -05:00
Jonathan Watt
115b647d6c Bug 1253094, part 11 - Make DebugOnly a MOZ_STACK_CLASS. r=Waldo
MozReview-Commit-ID: I09tdRotoJq

--HG--
extra : rebase_source : d3a895ca6138d4e8a4ed87109434db922b9cac53
2016-02-26 15:52:08 +00:00
Nathan Froyd
d75c1bad6a Bug 1170045 - part 1 - add bulk pop support to SegmentedVector; r=erahm
Writing PopLastN in this way is probably a bit of a micro-optimization,
but at least it comes with tests and some comments for verifying the
goodness of the code.
2016-03-04 12:02:24 -05:00
Nathan Froyd
10eb1a5af3 Bug 1170045 - part 0 - modify TestSegmentedVectors to use explicitly-updated counts; r=erahm
The scheme in TestSegmentedVectors to use manually-annotated points and
magic numbers corresponding to those annotations works OK for small
numbers of operations.  But for testing bulk push and pop, we're going
to be doing many more operations, so let's move to recording explicitly
in code the operations we expect to see, and checking those instead.
2016-03-04 12:00:33 -05:00
Nathan Froyd
550f775a8d Bug 1252902 - remove ScopedFreePtr; r=Waldo
We have UniqueFreePtr as a replacement, which at least uses
more-standard machinery to do its job.
2016-03-02 11:44:27 -05:00
Nathan Froyd
76173ee85d Bug 1251723 - remove ScopedDeletePtr; r=Waldo
UniquePtr is more standard than ScopedDeletePtr; using standard
constructs whenever possible is preferable.
2016-02-26 15:08:03 -05:00
Jonathan Watt
8429c38aa7 Bug 1248843 - Make it clearer that DebugOnly uses up space even in optimized, non-DEBUG builds. r=Waldo
--HG--
extra : rebase_source : 6de3e55b8a7c4272bec3b5b8b8eb5da7ad78e9cf
2016-02-19 12:57:42 +00:00
Nathan Froyd
556bde5629 Bug 1252195 - part 1 - implement UniqueFreePtr; r=Waldo
Just like UniquePtr<T>, except that we're going to delete the allocated
memory with |free()|.
2016-02-29 10:29:13 -05:00
Bobby Holley
205b124ab5 Bug 1251496 - Introduce a servo-side data structure to represent the style set. r=heycam 2016-02-28 00:25:33 -08:00
Eric Rahm
c47a83ce36 Bug 1251769 - Remove remaining references to MOZILLA_XPCOMRT_API from mfbt. r=froydnj 2016-02-27 11:12:07 -08:00
Seth Fowler
57081a13af Bug 1250666 - Forward Variant's move constructor argument correctly to the underlying variant type. r=waldo 2016-02-26 21:01:49 -08:00
Seth Fowler
27ae3900e1 Bug 1246841 - Allow construction of Variant values using type inference. r=waldo
--HG--
extra : rebase_source : 7d596149e6d3c630d62aab0d65d5a826af731bf5
2016-02-25 14:34:12 -08:00
Seth Fowler
4052eca615 Bug 1246838 - Handle const qualifiers and references better in Variant. r=waldo
--HG--
extra : rebase_source : 4dc9df6cb5ea9b994c5074b505471101746def83
2016-02-25 14:34:12 -08:00
Nicholas Nethercote
2e0403bcfe Bug 1247835 (part 0) - Minor comment and style tweaks in BinarySearch.h. r=luke.
--HG--
extra : rebase_source : 1e778ebbc7e297dcc2a65dbd522dd1f8c99bd790
2016-02-23 15:41:39 +11:00
Ehsan Akhgari
9f38f2d1e0 Bug 1250196 - Part 2: Rename UniquePtr::getDeleter() to get_deleter() in order to make it compatible with std::unique_ptr; r=froydnj 2016-02-22 15:51:59 -05:00
Xidorn Quan
d2510ef7a5 Bug 1248851 part 4 - Mark UniquePtr::release() MOZ_WARN_UNUSED_RESULT. r=Waldo
MozReview-Commit-ID: FH7t5gZ0nVG

--HG--
extra : source : d2e0a96cfa48756f0e101a089999142a703fa24c
2016-02-20 11:06:25 +08:00
Sebastian Hengst
f41859330d Backed out changeset 5f729d20fd00 (bug 1249728) for bustage. r=bustage on a CLOSED TREE 2016-02-19 22:18:49 +01:00
Trevor Saunders
23aabd18d7 bug 1249728 - make the nondebug ctors for DebugOnly constexpr r=froydnj 2016-02-19 15:54:38 -05:00
Bobby Holley
efe3a336f3 Bug 1248784 - Followup to add requested comment. r=froydnj DONTBUILD 2016-02-17 10:16:47 -08:00
Bobby Holley
d7835725e4 Bug 1248784 - Extract the AddRef/Release calls into a non-inner helper trait. r=froydnj 2016-02-17 10:15:19 -08:00
Bobby Holley
75abd802d9 Bug 1248784 - Rename the existing AddRefTraits to ConstRemovingRefPtrTraits. r=froydnj 2016-02-17 10:15:17 -08:00
Jonathan Watt
3389490ae3 Bug 1245414, part 10 - Apply the Mozilla patches via mfbt/decimal/update.sh. r=Waldo
--HG--
extra : rebase_source : 791e169635d9bb13f0a7a9593007a7ed3acaf3a0
2016-02-11 19:43:14 +00:00
Jonathan Watt
faa1155f4b Bug 1245414, part 9 - Disable mfbt/decimal/fix-wshadow-warnings.patch. r=cpeterson
--HG--
extra : rebase_source : 6e6832aaef2fa20feac1d18c839ad2e90d468685
2016-02-11 19:07:42 +00:00
Jonathan Watt
fd49e9c851 Bug 1245414, part 8 - Remove mfbt/decimal/floor-ceiling.patch now that the issue is fixed upstream. r=Waldo
--HG--
extra : rebase_source : 6fd88f5f2a27f29bc3e01943868ac81a232dddac
2016-02-11 19:07:42 +00:00
Jonathan Watt
66a8428e62 Bug 1245414, part 7 - Update mfbt/decimal/to-moz-dependencies.patch. r=Waldo
--HG--
extra : rebase_source : e79b2009d89c8921f632f7ebc5bfb908b5444523
2016-02-11 19:07:42 +00:00
Jonathan Watt
b8a0bc7f14 Bug 1245414, part 6 - Update mfbt/decimal/mfbt-abi-markers.patch. r=Waldo
--HG--
extra : rebase_source : 72a3e469b651c1f7ceddc4f7c220572e2835aab8
2016-02-11 19:07:42 +00:00
Jonathan Watt
f5ad611e1f Bug 1245414, part 5 - Update mfbt/decimal/comparison-with-nan.patch. r=Waldo
--HG--
extra : rebase_source : 00746c16dc88e2b87488cc95171d84b48c62b151
2016-02-11 19:07:41 +00:00
Jonathan Watt
2439bc12ad Bug 1245414, part 4 - Update mfbt/decimal/zero-serialization.patch. r=Waldo
--HG--
extra : rebase_source : 96cf5b120ac836157ec560da278e286b4ff70049
2016-02-11 19:07:41 +00:00
Jonathan Watt
e48f82b02f Bug 1245414, part 3 - Overwrite mfbt/decimal/Decimal.* with vanilla upstream copies. r=Waldo
--HG--
extra : rebase_source : 8139e78c73f1d6d4b96c7f65640d7b515abdc57e
2016-02-11 19:07:41 +00:00
Jonathan Watt
dde69bf76a Bug 1245414, part 2 - Update mfbt/decimal/update.sh to reflect Blink's switch from svn to git, and the different files we now pull. r=Waldo
--HG--
extra : rebase_source : 1b6c79ad740cb90d19c69ec9ed64a9a9789b27f7
2016-02-11 19:07:41 +00:00
Jonathan Watt
2897f074a1 Bug 1245414, part 1 - Delete the mfbt/decimal/LICENSE* files since upstream now just uses inline comments. r=Waldo
--HG--
extra : rebase_source : d3be9552bc981e6c96455dc6d674c2dab87bcd36
2016-02-11 19:07:40 +00:00
Jeff Walden
d9ee752669 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
f3949ab1d3 Bug 1216001 part 1 - Optimize nsRange::IsNodeSelected. r=bz 2016-02-13 18:40:23 +01:00
Nick Fitzgerald
6f93fd8916 Bug 1247412 - Add a reverse method to mozilla::Vector; r=Waldo 2016-02-11 08:33:00 +01:00
Chris Peterson
5a6ee4e222 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
9d0e08b626 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
a3c53b91a3 Bug 1216001 part 1 - Optimize nsRange::IsNodeSelected. r=bz 2016-02-12 02:13:57 +01:00
Jon Coppeard
911e4a2d8b 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
6a5930b454 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
0afa44b210 Bug 1232765 - Remove the workaround added in bug 1022050 2016-02-07 14:50:50 -05:00
Lee Salzman
b607eb03af 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
ad6d42d817 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
4ff72292de Backed out changeset 8d6c228ef008 (bug 1194721) on developers request 2016-02-03 16:25:00 +01:00
Thomas Zimmermann
3d9f64bb3e 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
71421aec25 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
9668b6f572 Bug 1241901 part 3 - Add IsMemberPointer and IsScalar type traits. r=froydnj
--HG--
extra : source : 02269acc78bfde8d3171bf6023a5dda4cac9df3c
2016-01-30 10:33:41 +11:00
Morgan Phillips
a427bd0117 Bug 1238582 - Skip simulated OOM check in the case where we're growing within reserved space; r=Waldo
--HG--
extra : rebase_source : a0f1db09b114478c52609de705dce4ba9a74445a
2016-01-28 10:07:14 -06:00
Ehsan Akhgari
a240a28c7f 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
5412728905 Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07:00
Jan de Mooij
e713b8b0ac Bug 1237201 part 8 - Make fallible Vector methods MOZ_WARN_UNUSED_RESULT. r=jwalden
--HG--
extra : rebase_source : fdfb0d0f592a968ee9e5852f2cc05f0873a02375
2016-01-14 22:04:36 +01:00
Jim Blandy
88d51252f9 Bug 1239479: Add comments to mfbt/XorShift128PlusRNG.h from the RNG's designer. DONTBUILD r=Waldo
--HG--
extra : rebase_source : b6f2dc01d0581c668923ad14708cec790795d5c1
extra : amend_source : bf55f132226390983c0601fab2989fa0f7cf3a26
2016-01-13 12:46:40 -08:00
Chris Peterson
e92b68d840 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
bfbfcf7575 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
fa1db4f4b7 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
ec54e89c4c Backed out changeset 138c4e6a9b45 (bug 1231378) 2016-01-12 15:48:55 +01:00
Andrea Marchesini
8cb83b4f57 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
2b12d59585 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
b29099ae6d Bug 1228641. Add a polyfill of std::initializer_list. r=froydnj 2016-01-06 22:06:35 -05:00
Jan de Mooij
36e21ef4d9 Bug 1231224 part 10 - Make various Vector calls check for OOM. r=terrence
--HG--
extra : rebase_source : fae86eb928fc510c3d5c7a895675cf218fc15b3a
2016-01-06 21:06:25 +01:00
Chris Peterson
3171200ff5 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
6b46b54d1f Bug 1232694 - fix typo in Compiler.h; r=botond 2015-12-15 11:14:53 -05:00
Nick Fitzgerald
4560db90e5 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
46bb7c80dd Bug 1228947 - Replace mfbt/Constants.h with math.h. r=roc
--HG--
extra : rebase_source : 4ab2c4a917ea90055e48bd6adcb53904f2266ee0
2015-11-27 20:49:55 -08:00
Xidorn Quan
5216514639 Bug 1228182 - Use division directly for generating double in XorShift128PlusRNG. r=Waldo
--HG--
extra : source : f090915a20c5d1281cd49a7aa7668ad77f83435a
2015-12-03 12:16:18 +11:00
Jan de Mooij
90cb097793 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
2a82df055d 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
572059374e Bug 1178266 - Link against libatomic when necessary. r=froydnj 2015-12-02 11:04:37 +09:00
Botond Ballo
1a83097cba Bug 1221680 - Avoid hard errors when testing convertibility using the IsConvertible type trait. r=froydnj
--HG--
extra : source : ea11bb67c3510671a501724d17d9872c3455891d
2015-11-06 17:47:36 -05:00
Bill McCloskey
47b5adaa34 Bug 1221368 - Change MakeTuple to decay the types of its arguments (r=froydnj) 2015-11-09 10:21:11 -08:00
Nathan Froyd
e763192040 Bug 1216611 - add mozilla::MakeUniqueFallible and convert uses throughout the tree; r=Waldo 2015-11-05 16:24:24 -05:00
Sean Stangl
2e1255ee1e Bug 939157 - RotateLeft with shift of zero gives undefined behavior. r=Waldo 2015-11-03 14:25:48 -08:00
Jeff Walden
fe5445d030 Bug 1220693 - Make mozilla::Atomic<enum class> work even on compilers that don't have <atomic>. r=froydnj
--HG--
extra : rebase_source : 2eb167a1b86a1a93527761a9541ea30ad213785a
2015-11-03 13:03:26 -08:00
Markus Stange
ef4655be32 Bug 1201330 - Keep scroll handler induced layer activity active until the scroll frame becomes inactive. r=roc
--HG--
extra : commitid : K9ntCNQz1Fx
extra : rebase_source : ed8a567f22626d7074bbc58eb5e61baa251fe2c3
2015-10-30 16:28:53 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Mike Hommey
c3385563ef 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
2fe6ba353f Backed out changeset d5d68c0258f3 (bug 1201330)
--HG--
extra : rebase_source : 2b98ebd0dd0ccd247b50e4b45210137622ef4441
2015-10-30 14:44:06 +01:00
Markus Stange
09bf18ccd8 Bug 1201330 - Keep scroll handler induced layer activity active until the scroll frame becomes inactive. r=roc
--HG--
extra : commitid : AV1sQewWYHl
extra : rebase_source : ef132043f3af460c1aabc531faa06752d4c9c2df
2015-10-27 17:18:03 +01:00
Mike Hommey
beffa7ff42 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
001cd79ef9 Bug 1214958 - Add operators &=, |=, and ^= to mozilla::DebugOnly. r=froydnj
--HG--
extra : commitid : 2f0PRWFcnzP
2015-10-19 20:42:28 -07:00
Cameron McCormack
0cabb3c016 Bug 1216041 - Add ranged iterator support to mozilla::{Array,RangedArray,EnumerationArray}. r=froydnj 2015-10-20 10:16:20 +11:00
Cameron McCormack
8df7b927c3 Bug 1216040 - Make ArrayLength support mozilla::EnumeratedArray. r=froydnj 2015-10-20 10:16:20 +11:00
Cameron McCormack
4fa140ec32 Bug 1216038 - Deduce underlying integer type for MakeEnumeratedRange starting at 0. r=froydnj 2015-10-20 10:16:19 +11:00
Chris Peterson
0308741102 Bug 1215411 - Define MOZ_FALLTHROUGH annotation to suppress clang's -Wimplicit-fallthrough warnings. r=botond 2015-10-04 21:03:26 -07:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
483783681e Bug 1207245 - part 4 - remove RefPtr.h; r=ehsan
It has been superseded by the availability of nsRefPtr.h.
2015-10-18 00:40:16 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Jim Blandy
51d813dfae No bug: Fix comment in mfbt/FastBernoulliTrial.h. DONTBUILD r=me
--HG--
extra : rebase_source : 03a213a8999d4b6b47c6e2be3a8ea06053e24184
extra : amend_source : 9181ae56e72b66bf19fe2129bfab01f0910aaad8
2015-10-16 12:21:39 -07:00
Steve Fink
2fac3971ef Bug 1212624 - Tests for LinkedList, r=Waldo
--HG--
extra : rebase_source : 39cb2bc90342da5d5fc1379f805b1dd701a108df
2015-10-07 12:36:00 -07:00
Steve Fink
2ac5b36223 Bug 1212624 - Implement range-based iteration for LinkedList, r=Waldo
--HG--
extra : rebase_source : 9d3d1b40cab8542f4e7aaf9ffe1496c646c8291e
2015-10-07 14:19:42 -07:00
Nathan Froyd
86aec2801f Bug 1207245 - part 6a - call AddRef/Release from nsRefPtr itself, rather than a helper; r=botond
The problematic class is AtomicRefCountedWithFinalize, from gfx/layers/;
I don't know all the details for why that class is written the way it
is, but it is simpler to make nsRefPtr work the same way as
mozilla::RefPtr in this case.
2015-10-12 22:29:51 -04:00
Steve Fink
833a3ce77b Backed out 5 changesets (bug 1212624) for breaking stuff.
Backed out changeset cf5ffa45a4a2
Backed out changeset 0d7a968d2d64 (bug 1212624)
Backed out changeset 379edefa8e47 (bug 1212624)
Backed out changeset f73fca35daad (bug 1212624)
Backed out changeset 4f499d30a0e0 (bug 1212624)
2015-10-14 16:49:12 -07:00
Steve Fink
c860330eec Bug 1212624 - Tests for LinkedList, r=Waldo
--HG--
extra : rebase_source : f44eac4762baa6cc47e5ea370fe19ea35aaf9c88
2015-10-07 12:36:00 -07:00
Steve Fink
0df76da429 Bug 1212624 - Implement range-based iteration for LinkedList, r=Waldo
--HG--
extra : rebase_source : fb99021b13d030e12257ed420887051c7c5f9b8c
2015-10-07 14:19:42 -07:00
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
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
Makoto Kato
f75a6aad6a Bug 1190313 - Set MOZ_HAVE_EXPLICIT_CONVERSION on VS2015. r=nfroyd 2015-08-05 17:14:42 +09:00
James Cheng
3c66e2ba33 Bug 1189231 - Refine operator() call with perfect forwarding. r=nfroyd 2015-07-30 21:16:00 -04:00
Michael Layzell
e0cec02548 Bug 1187073 - Use MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS to validate the usage of AlignedStorage2. r=ehsan
--HG--
extra : rebase_source : 43caddb03d8bf630edd6f8f60f5dff0e8890e7b8
2015-07-31 13:59:00 -04:00
Muhsin Ali Steiman
a3e17520d3 Bug 1188895 - Replace U+0A00 with U+0200 in MacroForEach.h. r=Ms2ger 2015-08-01 00:36:00 -04:00
James Cheng
3e08229848 Bug 975246 - Part1 - Implement operator->* in nsRefPtr. r=nfroyd, r=gerald 2015-07-29 19:47:00 +02:00
Bobby Holley
97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Ehsan Akhgari
91324a3c5a Bug 1188204 - Fix more constructors in MFBT; r=froydnj 2015-07-28 12:24:39 -04:00
Oliver Henshaw
094a6a5246 Bug 1186126 - Note incompatibility with NSPR printf-like functions. r=nfroyd
printf-like functions
2015-07-27 10:08:00 +02:00
Liang-Heng Chen
2d9863ad53 Bug 1185706 - support Tie() for mozilla::Pair. r=froydnj 2015-07-24 00:42:00 +02:00
Ehsan Akhgari
20eee585a6 Bug 1159433 - Part 2: Add the MOZ_NON_MEMMOVABLE and MOZ_NEEDS_MEMMOVABLE_TYPE macros to MFBT; r=froydnj 2015-07-24 19:15:18 -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
Nick Fitzgerald
a23f223b5f Bug 1186650 - Do not mark mozilla::Variant copy and move constructors as explicit. r=Waldo 2015-07-22 14:49:00 -04:00
Liang-Heng Chen
5a9d777bf3 Bug 1186315 - Fix TestTuple error and add it into testing list. r=nfroyd 2015-07-21 22:54:00 +02:00
Makoto Kato
4b6d56e4ff Bug 1007050 - Remove std::isinf workaround for MSVS. r=Waldo 2015-07-23 14:52:29 +09:00
David Major
ec86960f3c Bug 1185686: Fix Atomics.h ifdefs for clang-cl. r=froydnj 2015-07-20 17:04:46 -04:00
Botond Ballo
f1d4fcd69b Bug 1184385 - Add a Tie() utility function for tuples (the equivalent of std::tie()) to MFBT. r=froydnj
--HG--
extra : rebase_source : 5d6ce0668782e4f3339dbca0d15e2202b566c6b3
extra : source : 9f736422e7903a20560bb83d1832f85a28b89880
2015-07-18 03:48:39 -04:00
Nick Fitzgerald
f3f20427ee Bug 1184235 - Add mozilla::Vector::emplaceBack; r=froydnj 2015-07-20 11:13:28 -07:00
Nick Fitzgerald
bdd6b06c87 Bug 1184839 - Provide an overloaded == operator for mozilla::Variant; r=Waldo 2015-07-19 16:32:00 +02:00
Jeff Gilbert
0616f41059 Bug 1182370 - _BitScan* does not modify *pIndex if input is zero. - r=waldo 2015-07-17 10:24:30 -07:00
Jeff Gilbert
d44d3d56e2 Bug 1177887 - Deref *after* changing the value held by RefPtr. - r=waldo 2015-07-16 17:15:44 -07:00
Benoit Girard
fe3dfcf5b2 Bug 1182516 - Add Chaos Mode environment variable MOZ_CHAOSMODE. r=roc
--HG--
extra : commitid : qfYBMvxZ7k
extra : rebase_source : 4c7098464712d7e5fa88ba1d8fba7c044772b0d6
2015-07-14 17:29:23 -04: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
1d1140657d Bug 1180993 - Part 2: Add the MOZ_MUST_USE attribute to mfbt, and use it to verify usage of already_AddRefed. r=ehsan 2015-07-06 21:42:00 -04:00
Steve Fink
fda6cabeb6 Bug 1180299 - Implement ScopeExit for running actions at the end of a scope, r=Waldo
--HG--
extra : commitid : JVZx97WUQxy
extra : rebase_source : 5cef069fd3071ad305a3e3f04e0addff577b1093
2015-07-03 14:20:55 -07:00
Xidorn Quan
5ebb867d28 Bug 1175485 part 4 - Add unit test for integer range. r=waldo
--HG--
extra : source : 2fb0dd6ca01c21b9282e0d7637ac09c2e8539a02
2015-07-02 13:31:07 +10:00
Xidorn Quan
5ce6110994 Bug 1175485 part 3 - Remove unused operators, typedefs and IteratorTraits. r=waldo
--HG--
extra : source : c1d3256e987c25935cc8bd321c413a1e0c7586b3
2015-07-02 13:31:07 +10:00
Xidorn Quan
0a629d8242 Bug 1175485 part 2 - Add static_assert to MakeRange to ensure it is used with integers. r=waldo
--HG--
extra : source : ca970199a7f1ee9adc11019a65ef8eba1f2a491e
2015-07-02 13:31:07 +10:00
Xidorn Quan
f15e97fc12 Bug 1175485 part 1 - Allow inner iterator of ReverseIterator deref to any type, and change IntegerIterator, EnumeratedRange, and nsFrameList::Iterator to return value type instead of a reference. r=roc,waldo
--HG--
extra : source : 1e932a13595a1d3862f171e7e7435422d890fbf0
2015-07-02 13:31:07 +10:00
Nathan Froyd
a2f2f68970 Bug 1161627 - part 3 - remove TemporaryRef<T> from RefPtr.h; r=ehsan 2015-05-05 13:22:12 -04:00
Nathan Froyd
974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Nick Fitzgerald
474c4d36e3 Bug 1174906 - Add a mozilla::Variant<T1, T2, ...> template class; r=Waldo 2015-06-30 10:01:00 -07:00
Markus Stange
8f3e1c59d9 Bug 1165185 - Try to avoid invalidations when scrolling transformed elements. r=roc
--HG--
extra : rebase_source : e044d64a50c6afff9e518cf53c51aa9658f3b41e
2015-06-15 19:20:59 -04:00
Nicholas Nethercote
f5cca86bcb Bug 1174046 - Fix PLDHashTable::Iterator in chaos mode again. r=froydnj, a=philor
CLOSED TREE

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.
2015-06-11 18:23:26 -07:00
Nathan Froyd
123e1631f7 Bug 1161627 - part 1 - add move constructor and assignment operator for already_AddRefed&& to RefPtr; r=ehsan
This change is prep work for future mass rewriting.
2015-05-05 13:02:21 -04:00