Alex Gaynor
a13531321e
Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj
2018-05-18 18:59:00 -04:00
Gurzau Raul
841689c6d7
Backed out changeset 1d0aa0c581cf (bug 1456189) for bustage on selftest.py on a CLOSED TREE
2018-05-18 01:00:26 +03:00
Alex Gaynor
bb3ec615d6
Bug 1456189 - Simplify BufferList::Extract to make the lifetimes clearer. r=froydnj
2018-05-17 17:16:43 -04:00
Tom Ritter
4c56c059bb
Bug 1460645 Avoid the thread_local keyword for MinGW and instead use __thread r=froydnj
...
MozReview-Commit-ID: 5RPwQVatThs
--HG--
extra : rebase_source : 0ad9a69f51529c6a35dc76555e4cb5d37a087a28
2018-05-10 11:11:19 -05:00
Nathan Froyd
d0ba1c83de
Bug 1410186 - turn Maybe assertions into diagnostic assertions; r=bkelly
...
We out-of-line the relevant functions because assertions can generate
quite a bit of code, and we'd rather let the compiler determine if these
functions should be inlined now.
2018-05-15 16:34:59 -04:00
Ryan VanderMeulen
1e5a06e4b0
Bug 1460316 - Update lz4 to version 1.8.2. r=froydnj
2018-05-09 12:16:28 -04:00
Aaron Klotz
84feb9c523
Bug 1460057: Update WindowsVersion with latest Windows 10 build numbers; r=froydnj
2018-05-07 17:24:51 -06:00
Gerald Squelart
9b8e47ab12
Bug 1448494 - NonDereferenceable<T> wraps a T* and prevents dereferencing ops - r=froydnj
...
NonDereferenceable denotes the intent that a pointer will (most likely) not be
dereferenced, but its numeric value may be used for e.g. logging purposes.
Dereferencing operations are explicitly disabled to avoid unintentional misuses.
Casting is still possible between related types (same as with raw pointers),
but pointers stay safely stored inside NonDereferenceable objects. These casts
do not trigger `clang++ -fsanitize=vptr` errors.
MozReview-Commit-ID: 5885pB7hSFR
--HG--
extra : rebase_source : 3c4011da64d84f1b19991742b76bafbffa90d590
2018-03-28 17:48:53 +11:00
Masatoshi Kimura
2b6d5d5d7e
Bug 1442275 - Implement a path charset agnostic wrapper for PR_LoadLibraryWithFlags. r=froydnj
...
MozReview-Commit-ID: 5rjmcv4kz9x
--HG--
extra : rebase_source : b57c7e79ceaa2dc3d65f52ee8f665c640dd1f41c
2018-04-24 00:31:53 +09:00
Jon Coppeard
edcb15ad07
Bug 1456875 - Add const iterators for LinkedList r=Waldo
2018-04-30 10:21:31 +01:00
Jeff Walden
04d21ccac0
Bug 1451248. r=jorendorff, r=bz
...
--HG--
extra : rebase_source : e26439a5954162bdaf332fbd63d623a3810e19e0
2018-04-25 19:40:09 -07:00
Alex Gaynor
3e8fd2dc07
Bug 1450232 - in IPC, check that lengths fit in the available data before allocating data; r=mccr8
...
There are three things we want to be true:
a) If the child sends a large value and the parent can't allocate enough space
for it we use an infallible allocation so the parent dies with an OOM.
b) If a fuzzer generates (huge-length, small-data) we don't try to allocate
huge-length bytes; knowing that the read will fail.
c) No fuzzer-specific branches in the core IPC serialization code.
Finally, this makes (huge-length, small-data) consistent with other cases where
the data is potentially truncated: ReadParam returns false.
MozReview-Commit-ID: 6nDKrw5z4pt
--HG--
extra : rebase_source : 58372d29139e9545a6ed2852c7243affeab6fdb7
2018-04-19 16:53:29 -04:00
Nathan Froyd
9362ad6e83
Bug 1454052 - make MakeScopeExit a MOZ_MUST_USE function; r=gerald
...
Otherwise, one can do thinkos like:
MakeScopeExit(...);
and the scope exiting function will execute much earlier than the
intended:
auto guard = MakeScopeExit(...);
2018-04-18 12:14:18 -04:00
Margareta Eliza Balazs
dbef13782c
Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout
...
Backed out changeset ac685df07bfc (bug 1451278)
Backed out changeset 5944ccd5060d (bug 1451278)
2018-04-16 21:41:03 +03:00
Nicholas Nethercote
e1318b1d03
Bug 1451278 - Remove ConstExpr hash functions. r=froydnj
...
MozReview-Commit-ID: L6yRyt4DZRR
--HG--
extra : rebase_source : 2d56a50b1a99e66c397165b9b851e23ca66d97a0
2018-04-16 08:37:15 +10:00
Jeff Walden
821db93ccc
Bug 1453456
- Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
...
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Jeff Walden
9ea9bcc2df
Bug 1453456
- Add/use more ASCII alphanumeric testing/conversion functions from MFBT in SpiderMonkey code in various places. r=froydnj
...
--HG--
extra : rebase_source : b4e05102cce2ad5dabb973a3968f1112376da594
2018-04-10 11:42:54 -07:00
Tom Bannister
988d18881f
Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond
...
MozReview-Commit-ID: 1Ema7TUNr5v
--HG--
extra : rebase_source : e5bb164dbe19993214e8c16f92b0a1f5d2ff3fa1
2018-04-09 21:12:13 +10:00
Sebastian Hengst
0819f35e51
Backed out 4 changesets (bug 525063) on request from Andi. a=backout
...
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Masatoshi Kimura
caada858fb
Bug 1451722 - Constexpr-ify mozilla::Span more. r=hsivonen
...
MozReview-Commit-ID: B7sxH5BAdp6
--HG--
extra : rebase_source : 3e7bf5424478cdff6dfd1c25b9808a41cfb6e0d3
2018-04-05 21:55:00 +09:00
Tristan Bourvon
a3a77c0312
Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan
2018-04-10 21:11:02 +02:00
Jeff Walden
be8ccd5a6b
Bug 1452619 - Implement mozilla::IsAsciiAlpha. r=froydnj
...
--HG--
extra : rebase_source : fd1e3284d293edad0bd96cc378eeeeb1bc2c8829
2018-04-09 12:02:43 -07:00
Nicholas Nethercote
374e333b76
Bug 1451658 - Add MOZ_STATIC_CLASS. r=mystor
...
MozReview-Commit-ID: HlbfoQypMcI
--HG--
extra : rebase_source : 3f91229f7190f04a9f512a6ac594674e05829039
2018-04-10 17:31:31 +10:00
Nathan Froyd
cc035fe9e0
Bug 1444125 - don't poison Maybe on construction; r=gerald
...
This behavior is pretty heavy-handed and degrades performance.
2018-04-10 13:46:00 -04:00
Nathan Froyd
e7e0eac6bc
Bug 1444125 - work harder to generate good code for Maybe poisoning; r=gerald
2018-04-10 13:46:00 -04:00
Sylvestre Ledru
99f0e1b624
Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen
...
MozReview-Commit-ID: 6xrdrggcVFR
--HG--
extra : rebase_source : f53d9a62e828d65469c42c79a468b5bea2e8b645
2018-04-05 11:42:23 +02:00
Jonathan Kew
c66fb1e660
Bug 1451296 - Make enabling of font-variation-settings and font-optical-sizing properties dependent on adequate platform support at runtime. r=lsalzman
2018-04-05 18:53:56 +01:00
Masatoshi Kimura
3560ad5b6e
Bug 1449094 - Implement constexpr mozilla::AllOf. r=froydnj
...
MozReview-Commit-ID: KvKY9CMqfww
--HG--
extra : rebase_source : 5e548884d3a331b5dc8704a690ccbd532ac2534a
2018-03-28 00:01:08 +09:00
Henri Sivonen
5f81ea7f50
Bug 1448591 - Make MakeStringSpan(nullptr) return an empty span. r=froydnj.
...
MozReview-Commit-ID: EyuLeWjEL7w
--HG--
extra : rebase_source : a40b671692db0e7faa7772654cb4b1ae75bd30a2
2018-03-24 21:36:00 +02:00
Bogdan Tara
8b1819017d
Backed out changeset 577c20417552 (bug 1449094) for failing /builds/worker/workspace/build/src/mfbt/tests/TestAlgorithm.cpp CLOSED TREE
2018-03-30 01:54:04 +03:00
Masatoshi Kimura
316aea87d9
Bug 1449094 - Implement constexpr mozilla::AllOf. r=froydnj
...
MozReview-Commit-ID: KvKY9CMqfww
--HG--
extra : rebase_source : 15efd61da5b66d6bbb4655cf95936c5d36473a82
2018-03-28 00:01:08 +09:00
Emilio Cobos Álvarez
1f4687f9fc
Bug 1448387: Use alignof() in HasFreeLSB. r=froydnj
...
This doesn't seem relevant for the differences between MOZ_ALIGNOF and alignof
mentioned in bug 1288016.
MozReview-Commit-ID: 8f9Ui7Aecfj
2018-03-23 19:09:42 +01:00
Jeff Walden
36462015eb
Bug 1446592 - Update our local double_conversion to tip. Also remove one local patch as unnecessary as of MSVC 2010, hacking around prior versions' lack of <stdint.h> support. r=froydnj
...
--HG--
extra : rebase_source : ae21e264fc97373f42ea4a01189caed48e785e9c
2018-03-16 20:25:17 -07:00
Nicholas Nethercote
cecefaa849
Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden
...
This is a `constexpr` alternative to HashString(const char16_t*). We can't make
HashString(const char16_t*) itself `constexpr` because HashUntilZero(const T*)
isn't in a form that older compilers (like GCC 4.9) allow to be made
`constexpr`. (The trick to satisfying those compilers is to use recursion
instead of iteration, to get the function into a single `return` statement.)
This requires making a bunch of other functions `constexpr` as well. It also
requires adding MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING
macros to avoid some MSVC weirdness.
The introduction of RotateLeft5() partly undoes one of the patches from bug
1443342, but that's unavoidable.
This change will help with static allocation of static atoms (bug 1411469).
MozReview-Commit-ID: 7r3PnrQXb29
2018-03-08 10:27:14 +11:00
Jeff Walden
0eefeabe25
Bug 1445024 - Implement mozilla::WrappingSubtract. r=froydnj
...
--HG--
extra : rebase_source : 026268df1cb1cfc56873e61834ea90257645c508
2018-03-06 19:22:20 -08:00
Jeff Walden
83186da179
Bug 1445024 - Consolidate some WrappingOperations.h comments and implementation bits. r=froydnj
...
--HG--
extra : rebase_source : 7efdbb7fa034645f6699954810c52709e54e29fe
2018-03-12 12:56:39 -07:00
Jeff Walden
52d9907ee0
Bug 1445024 - Implement mozilla::WrappingAdd. r=froydnj
...
--HG--
extra : rebase_source : 3514c6487305e64ce19060cb05d39bc6eb2fd912
2018-03-06 19:21:58 -08:00
Narcis Beleuzu
298d1d55b5
Merge mozilla-central to inbound. a=merge CLOSED TREE
2018-03-13 12:36:54 +02:00
Emilio Cobos Álvarez
2125f0fbd4
Bug 1444416: Handle references in the "can run script" checker. r=mystor
...
MozReview-Commit-ID: 8F9HjiFqbGN
--HG--
extra : rebase_source : 03d49b9a605ff5eade81a814b0903f81d87720ab
2018-03-09 17:51:59 +01:00
Jeff Walden
15bf6fd876
Bug 1442967 - Boo, MSVC warns when a cast will truncate a numeric constant. Arguably a desirable warning generally, but here we specifically intend the cast to narrow, so disable the warning. r=me in a CLOSED TREE
2018-03-12 19:20:42 -07:00
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