Jeff Walden
fc7dc7e60e
Bug 1442967 - When doing a comparison against a 64-bit constant in code run only in 64-bit builds, but compiled in 32-bit builds, cast it to uintptr_t so that the comparison isn't clearly false in 32-bit builds. rs=froydnj by suggestion on IRC
...
--HG--
extra : rebase_source : 2be98a1a0c436664ea0fa3ef8be55a9fb71541af
2018-03-12 13:36:44 -07:00
Jeff Walden
1b063823be
Bug 1442967 - Futz with a uintptr_t (as uint32_t) == uint64_t comparison to evade constantly-false compiler warnings in 32-bit builds. r=jorendorff
2018-03-09 21:59:08 -08:00
Nathan Froyd
1a68724fe3
Bug 1442304
- make already_AddRefed returnable in registers in non-DEBUG Unix builds; r=glandium,tjr
...
This change saves ~150k (!) of binary size on x86-64 Linux.
2018-03-07 14:27:28 -05:00
Jeff Walden
212527bdf1
Bug 1443342 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj
...
--HG--
extra : rebase_source : 6ecedb849aa51cffc493017661025365ecdb1eb2
2018-03-06 09:33:52 -08:00
Jeff Walden
ba5975180b
Bug 1443342 - Opt one HashFunctions.h function out of integer-overflow sanitizing and don't blacklist HashFunctions.h. r=froydnj
...
--HG--
extra : rebase_source : a33b53362c1f9ce96df22a321990a45a224af9d6
2018-03-01 17:11:33 -08:00
Jeff Walden
75f86d4202
Bug 1443342 - Remove HashFunctions.h's RotateBitsLeft32 and use the general RotateLeft function instead. r=froydnj
...
--HG--
extra : rebase_source : 88ad42c5757d9f1f0df5590c647a840061523318
2018-03-01 17:05:58 -08:00
Dorel Luca
0e437cae41
Merge mozilla-central to mozilla-inbound
2018-03-06 20:46:45 +02:00
Gerald Squelart
a1f5bed9e9
Bug 1443367 - Rework MakeNotNull to build with VS 2017 15.6 - r=njn
...
VS 2017 15.6 (March 2018) doesn't seem to understand
`*DeclVal<SharedFontList*>()` anymore.
To work around this issue, the pointed-to type is now extracted in a separate
struct, for which we provide a specialization for raw pointers, so we don't
encounter the shaky `*DeclVal<T*>()` statement anymore.
MozReview-Commit-ID: FuslManbfdB
--HG--
extra : rebase_source : be3813aa9a028e6891cb3de1fc4faae5bde0348e
2018-03-06 20:27:27 +11:00
Nathan Froyd
08e65e40ba
Bug 1443265 - make already_AddRefed a MOZ_TEMPORARY_CLASS; r=mystor
2018-03-05 16:12:41 -05:00
Nathan Froyd
2bd0c8e0a2
Bug 1414901 - part 2 - poison Maybe<T> instances when not in use; r=Waldo
2018-03-06 11:35:50 -05:00
Nathan Froyd
2ac6e45b48
Bug 1414901 - part 1b - eliminate alignment requirements for poisoning memory; r=Waldo
...
mozWritePoison secretly depended on the passed-in pointer being aligned
as though it were a pointer to uintptr_t, as it used bare stores to
C-casted pointers to accomplish poisoning. But this is an unnecessary
limitation: we can use memcpy and rely on the compiler to appropriately
inline the store to an unaligned store instruction if necessary.
2018-03-06 11:35:50 -05:00
Nathan Froyd
450618b0af
Bug 1414901 - part 1a - make mozWritePoison respect its documentation; r=Waldo
...
The documentation for mozWritePoison says that only an even number of
sizeof(uintptr_t) bytes are overwritten; any trailing bytes are not
touched. This documentation doesn't correspond to how the function
actually works. The function as written will happily overwrite trailing
bytes and any bytes not contained in the object, if the passed-in size
isn't divisible by sizeof(uintptr_t). Let's fix that.
2018-03-06 11:35:50 -05:00
Jason Orendorff
ef8693d6f2
Bug 1413049 - Part 1a: In a test, zero-pad hex integer constants to the width of their type. r=Waldo.
...
--HG--
extra : rebase_source : dfd3f1a00470856a177a526d385dd0f1b7d0ec38
2018-03-01 20:06:37 -06:00
Jason Orendorff
2418dfb4b3
Bug 1413049 - Part 1: Add methods to EndianUtils for pointer-sized integers. r=Waldo.
...
--HG--
extra : rebase_source : 115e40ecaee589b07e4ff9534694e56af7690e9b
2018-03-01 11:05:13 -06:00
Jeff Walden
25a7df6306
Bug 1441657 - Implement mozilla::WrappingMultiply. r=froydnj
...
--HG--
extra : rebase_source : 57d1796976a25597ee4dda90561d40debc6a9fc9
2018-02-15 17:36:55 -08:00
Jeff Walden
b0074d3a7d
Bug 1441657 - Create a new mozilla/WrappingOperations.h header to contain implementations of common math operations with well-defined wraparound semantics. r=froydnj
...
--HG--
rename : mfbt/MathAlgorithms.h => mfbt/WrappingOperations.h
rename : mfbt/tests/TestMathAlgorithms.cpp => mfbt/tests/TestWrappingOperations.cpp
extra : rebase_source : 552a0f17d7ba2ad6229d45fd2945592aceabb354
2018-02-15 17:36:50 -08:00
Blake Kaplan
32db9fed96
Bug 1404297 - Add a move constructor to SegmentedVector. r=smaug
...
Given that we have a SegmentedVector of nsCOMPtrs, it's probably worth
avoiding copying it.
MozReview-Commit-ID: GHyfVLrdnlQ
--HG--
extra : rebase_source : 75df805d8b2df32b76ee77b95ced625f20331744
2018-03-01 11:26:54 -08:00
Masatoshi Kimura
6648e322a9
Bug 1441112 - Stop including <iostream> in FStream.h. r=froydnj
...
MozReview-Commit-ID: 8SBsucRbL3i
--HG--
extra : rebase_source : 385a9fafbc07753c1273ed25b09e7c00edb5fe36
2018-02-28 21:45:04 +09:00
Sylvestre Ledru
b7b13979a7
Bug 1370794 - Use bool instead of integer being casted to bool r=Ehsan
...
MozReview-Commit-ID: lUVFeU0Y0p
--HG--
extra : rebase_source : c2dac9c0e0345111f68aea2b9e359ad94086430d
2018-02-07 15:15:28 +01:00
Jeff Walden
1b16de9738
Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj
...
--HG--
extra : rebase_source : dc4781e2a31ee0e75fc62951cbdc71eaa9fd7b1c
2018-02-15 17:22:14 -08:00
Jeff Walden
5472050225
Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE
...
--HG--
extra : amend_source : 72f066d9c75ae5ccd4d1e929896a2b12aa0ddc8c
2018-02-21 10:15:43 +02:00
Cosmin Sabou
48de1e7807
Backed out changeset 1fcc972d445b (bug 744965) for assertion failures on TestFloatingPoint.cpp on a CLOSED TREE
2018-02-21 10:12:45 +02:00
Gurzau Raul
14b89a5ae5
Backed out changeset 66c1c1596bea (bug 1438750) for assertion failure at TestFloatingPoint.cpp on Windows platform
2018-02-21 08:29:50 +02:00
Jeff Walden
2b6c4bedad
Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj
...
--HG--
extra : rebase_source : 76ecf4ab0caf7a5367636a866512931d3fd9b962
2018-02-15 21:02:53 -08:00
Jeff Walden
e77ef331a3
Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj
...
--HG--
extra : rebase_source : d6d890b7b20d93297f575abe838e8619418ea545
2018-02-15 17:22:14 -08:00
Sylvestre Ledru
78c25c6d82
Bug 1437482 - gcc 8 has no-sanitize but not the {un,}signed-integer-overflow option r=Waldo
...
MozReview-Commit-ID: EfRYhaISZfL
--HG--
extra : rebase_source : 2a5f32a71be4688d260786f6f762183f38b682a8
2018-02-12 12:07:52 +01:00
Masatoshi Kimura
9bbb2153d4
Bug 1428614 - Implement mozilla::IFStream and mozilla::OFStream. r=froydnj
...
This is drop-in replacements of std::ifstream and std::ofstream, but supports
widechar filenames on Windows. This is just an alias of std::ofstream on other
platforms.
MozReview-Commit-ID: FHNatG5595k
--HG--
extra : rebase_source : 0805153dd13907a6c3b6971bfc0b499a31416b9a
extra : intermediate-source : 3113df1e69bf7444105953df8610b8bbf5d4d41e
extra : source : 750263b126963d2634a89de0a2aac63efa4b49e6
2018-01-07 18:31:31 +09:00
Jeff Walden
0e77ce073b
Bug 1435484
- Split the integer-overflow blacklist into two blacklists, one for signed integer overflow and one for unsigned integer overflow, and rename both configure flags to be clearer. r=decoder, r=froydnj
...
--HG--
rename : build/sanitizers/ubsan_blacklist_int.txt => build/sanitizers/ubsan_signed_overflow_blacklist.txt
rename : build/sanitizers/ubsan_blacklist_int.txt => build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
2018-02-02 21:25:31 -08:00
Eric Rahm
61c1f85e41
Bug 1434689 - Part 2: Add MOZ_TEMPORARY_CLASS attribute. r=mystor
...
This adds the MOZ_TEMPORARY_CLASS attribute to Attributes.h.
--HG--
extra : rebase_source : aea2ac53705863a839bcf11245b67a9fc1da08bf
2018-01-31 15:22:42 -08:00
Nathan Froyd
46ffc41619
Bug 1435382 - fix documentation for AlignedElem; r=me
...
Sub-byte alignment isn't really a thing.
DONTBUILD because documentation fixes are always safe, amirite?
2018-02-02 15:24:51 -05:00
Tom Ritter
41a1a6c9b0
Bug 1433971 Clean up Assertions.h with respect to Unused Attributes r=froydnj
...
In Bug 1393538 I renamed MOZ_STATIC_ASSERT_UNUSED_ATTRIBUTE to MOZ_UNUSED_ATTRIBUTE,
moved it out of it's #define depth, and used it in toolkit. I also orphaned a
comment.
This was wrong. MOZ_UNUSED_ATTRIBUTE was basically identical to MOZ_MAYBE_UNUSED
which exists in Attributes.h (because it is an attribute, not an assertion.)
Undo that wrong thing: restore MOZ_STATIC_ASSERT_UNUSED_ATTRIBUTE to the correct
place, have toolkit use the correct macro, and remove MOZ_UNUSED_ATTRIBUTE.
MozReview-Commit-ID: 5BWWsXgbm9i
--HG--
extra : rebase_source : d07156068c877bf57d400bc6a71e115b7f1aef31
2018-01-29 11:36:19 -06:00
David Major
b0f6b50b37
Bug 1422372: Mark MOZ_NoReturn as MOZ_MAYBE_UNUSED. r=Waldo
2018-01-30 14:15:51 +13:00
Daniel Zielas
e80f2e7469
Bug 1427229 - Perform validation when sending an EnumSet over IPC. r=botond,froydnj
...
MozReview-Commit-ID: Cmugi1ldc1Z
--HG--
extra : amend_source : 88b792772ce7948172a68fda03d6d61de66347de
2018-01-21 21:23:21 +01:00
Jeff Walden
51f84c53a8
Bug 1432646 - Followup bustage fix for compilers that warn (error with -Werror-alike) when negating an unsigned expression. r=bustage in a CLOSED TREE
2018-01-27 00:25:40 -08:00
Jeff Walden
8314131139
Bug 1432646 - Implement mozilla::WrapToSigned. r=froydnj
...
--HG--
extra : rebase_source : 2c1a216830767da789eea59d00b55a45845f4d60
2018-01-25 14:48:01 -08:00
Masatoshi Kimura
17fb30182d
Bug 1428543 - Add mozilla::filesystem::Path and use it in nsIFile. r=froydnj
...
Currently only |value_type| is implemented.
MozReview-Commit-ID: 1mejzvkuako
--HG--
extra : rebase_source : 69e08073adbb9a866db26e515702a0659ece0a70
extra : intermediate-source : 3696381ddfdc19ab2f901ca4247e1cb4efb27731
extra : source : 35d760da1d73dd51614f434c26e5ce80ff690829
2017-12-28 03:03:35 +09:00
Ryan VanderMeulen
77a9b22fbc
Bug 1430708 - Update lz4 to version 1.8.1.2. r=froydnj
2018-01-22 08:48:44 -05:00
Chris Peterson
37efe4d0e6
Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
...
MozReview-Commit-ID: DCPTnyBooIe
--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Masatoshi Kimura
f4cb55c630
Bug 1428541 - Make char16ptr_t::operator bool() explicit. r=froydnj
...
clang-cl fails to build without this change due to ambiguous call.
MozReview-Commit-ID: 22x5PCsG221
--HG--
extra : rebase_source : 93d2d50abc126286ad78c1f3700fe358c507a826
extra : intermediate-source : a9c64eaa326a2c694456d2e8907074f75b66c645
extra : source : c0b55d2093f59a8dabf2640106befa0dae516906
2017-12-24 23:33:56 +09:00
Sylvestre Ledru
c911c249ec
Bug 1424866 - Update the comment for fix a warning: unnecessary parentheses in declaration of 'type name' r=gerald DONTBUILD
2018-01-04 11:59:13 +01:00
Sylvestre Ledru
530203c95e
Bug 1424866 - Fix a warning: unnecessary parentheses in declaration of 'type name' r=gerald
...
MozReview-Commit-ID: CBOTKHgqDfV
--HG--
extra : rebase_source : cc9d339008e7024b5406153bad37e4d717c7ae59
2018-01-03 17:43:04 +01:00
Valentin Gosu
679361e438
Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn
...
MozReview-Commit-ID: 2EM9cEOAkIl
--HG--
extra : rebase_source : 05ebe36ecdaacbaf26bd1b6e23715035996f88b4
2017-12-20 01:13:53 +01:00
Dorel Luca
d9227411a0
Backed out 2 changesets (bug 1424834) for AddressSanitizer failure r=backout a=backout
...
Backed out changeset 00e1d58aedfe (bug 1424834)
Backed out changeset 9b69f2b7d373 (bug 1424834)
2017-12-19 13:59:02 +02:00
Valentin Gosu
9d89df19e4
Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn
...
MozReview-Commit-ID: 2EM9cEOAkIl
--HG--
extra : rebase_source : b3950ed06e1bc014fff9aa1deb5c2387fb2eb5bb
2017-12-15 15:46:31 -06:00
Cosmin Sabou
f0ab0b072a
Backed out 2 changesets (bug 1424834) for leaks at netwerk/dns/nsHostResolver.cpp:352 r=backout a=backout
...
Backed out changeset 2503df83bbd9 (bug 1424834)
Backed out changeset 49cc08386f17 (bug 1424834)
2017-12-18 11:52:06 +02:00
Valentin Gosu
a659128162
Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn
...
MozReview-Commit-ID: 2EM9cEOAkIl
--HG--
extra : rebase_source : b3950ed06e1bc014fff9aa1deb5c2387fb2eb5bb
2017-12-15 15:46:31 -06:00
Masatoshi Kimura
456098425e
Bug 1424103 - constexpr-ify mozilla::Span. r=hsivonen
...
MozReview-Commit-ID: 4e98Aer9V1k
--HG--
extra : rebase_source : 44f87677a4918aea4abaf2721895e48045267c7b
2017-12-08 23:20:56 +09:00
Sylvestre Ledru
4591d82b23
Bug 1394734 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium
...
MozReview-Commit-ID: HbF5oT5HW6f
--HG--
extra : rebase_source : eca479b6ae4bff7f600d1cdb39e11ac2057e4e79
2017-12-07 22:09:38 +01:00
Sylvestre Ledru
5de63ef061
Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
...
MozReview-Commit-ID: 5orfnoude7h
--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Sylvestre Ledru
9bfe27d903
Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
...
MozReview-Commit-ID: 7duJk2gSd4m
--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00