Граф коммитов

1840 Коммитов

Автор SHA1 Сообщение Дата
Aaron Klotz 567add1b38 Bug 1569681: Part 3 - Update mfbt/Attributes.h with new MOZ_STATIC_LOCAL_CLASS macro; r=Ehsan
I did not add a separate macro for `MOZ_TRIVIAL_DTOR` as I could not really
think of a use case for it. Let me know if you prefer that I add it as a
distinct macro.

Differential Revision: https://phabricator.services.mozilla.com/D39719

--HG--
extra : moz-landing-system : lando
2019-07-29 19:38:37 +00:00
Nathan Froyd 5dda12ab15 Bug 1567944 - remove *DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING macros; r=dmajor
We don't support MSVC anymore, clang-cl ignores these pragmas, and
nobody actually used the macros anyway.

Depends on D38887

Differential Revision: https://phabricator.services.mozilla.com/D38888

--HG--
extra : moz-landing-system : lando
2019-07-23 08:02:48 +00:00
Nathan Froyd 8a524a8529 Bug 1567944 - remove MSVC-specific warning goo from {Vector,Span}.h; r=dmajor
We don't support MSVC anymore, and clang-cl just ignores these pragmas.

Differential Revision: https://phabricator.services.mozilla.com/D38887

--HG--
extra : moz-landing-system : lando
2019-07-23 09:24:28 +00:00
Jed Davis 370bd5030f Bug 1534780 - Move ipc::FileDescriptor's UniquePtr instance into MFBT as UniqueFileHandle. r=froydnj
MozReview-Commit-ID: 7bbGVIjTTaJ

Differential Revision: https://phabricator.services.mozilla.com/D26737

--HG--
extra : moz-landing-system : lando
2019-06-28 19:46:58 +00:00
Sylvestre Ledru e77bfc655d Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D38057

--HG--
extra : moz-landing-system : lando
2019-07-16 07:33:44 +00:00
Tom Prince 0cd3337d90 Bug 1458385: Package mar and mbsdiff as a toolchain; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D24229

--HG--
extra : moz-landing-system : lando
2019-07-11 16:40:13 +00:00
Jed Davis ffe4e7333c Bug 1562358 - Move fallible.h into MFBT. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D36541

--HG--
rename : memory/fallible/fallible.h => mfbt/fallible.h
extra : moz-landing-system : lando
2019-07-10 01:51:15 +00:00
Csoregi Natalia f30f0ab1f3 Backed out changeset 5bf39249f6e4 (bug 1562358) for spidermonkey bustage. CLOSED TREE
--HG--
rename : mfbt/fallible.h => memory/fallible/fallible.h
2019-07-09 19:26:58 +03:00
Jed Davis f0628ffad3 Bug 1562358 - Move fallible.h into MFBT. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D36541

--HG--
rename : memory/fallible/fallible.h => mfbt/fallible.h
extra : moz-landing-system : lando
2019-07-02 09:08:21 +00:00
Jim Blandy 45737ac244 Bug 1563065: Use const& in mozilla::Result constructors. r=froydnj
Change the `ResultImplementation` and `Result` constructors to accept success
values by `const` reference. This makes it possible for `Result` to carry
`MOZ_NON_PARAM` types as success values.

Differential Revision: https://phabricator.services.mozilla.com/D36682

--HG--
extra : moz-landing-system : lando
2019-07-05 23:50:16 +00:00
Kyle Huey 17b36a1a90 Bug 1563046: Move operator LogModule* out of line in debug builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D36675

--HG--
extra : moz-landing-system : lando
2019-07-02 23:58:18 +00:00
Emilio Cobos Álvarez b92a191709 Bug 1562789 - SmallPointerArray should support moves, and have an IsEmpty() helper. r=froydnj
This also implicitly deletes its copy-assignment operator and copy-constructor,
which is great since it's a huge footgun.

Differential Revision: https://phabricator.services.mozilla.com/D36549

--HG--
extra : moz-landing-system : lando
2019-07-02 18:50:04 +00:00
Jon Coppeard 26039d2f3b Bug 1561866 - Refactor HashTable move constructor/assignment operator as per review comments, missed from previous push r=jwalden 2019-07-02 10:55:29 +01:00
Csoregi Natalia 29f8e6aebd Merge inbound to mozilla-central. a=merge 2019-06-29 12:59:53 +03:00
Kagami Sascha Rosylight 8e0f5ebfdd Bug 1560658: Add SameValueZero to mfbt/FloatingPoint.h r=jwalden
Add ES-defined SameValueZero and replace existing code.

Differential Revision: https://phabricator.services.mozilla.com/D35596

--HG--
extra : moz-landing-system : lando
2019-06-28 23:57:13 +00:00
Narcis Beleuzu a89b67e772 Backed out 15 changesets (bug 1479960, bug 1426526, bug 1534780, bug 1536697) for toolchain bustages on UniquePtrExtensions.h . CLOSED TREE
Backed out changeset a8518ea4b594 (bug 1479960)
Backed out changeset 7172762c4b87 (bug 1536697)
Backed out changeset 2ea5ccb8f3a1 (bug 1426526)
Backed out changeset d892a888fe9c (bug 1426526)
Backed out changeset 2c4d12bdfec3 (bug 1479960)
Backed out changeset 8a322064cf6d (bug 1479960)
Backed out changeset 47d387b6cd4a (bug 1479960)
Backed out changeset 8332565a6943 (bug 1479960)
Backed out changeset 9d7f1835f96f (bug 1479960)
Backed out changeset 0aa8af4965c5 (bug 1479960)
Backed out changeset 036809330a51 (bug 1479960)
Backed out changeset 39e18373e3d3 (bug 1479960)
Backed out changeset 6c2b995a9d30 (bug 1479960)
Backed out changeset 3c2b31744645 (bug 1534780)
Backed out changeset 26bb00a94d5d (bug 1534780)
2019-06-28 22:42:00 +03:00
shindli 67c134b492 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-06-29 02:23:28 +03:00
Jon Coppeard afdba4e113 Bug 1561866 - Move alloc policies where possible r=jwalden
Patch to use std::move when passing AllocPolicy instances to constructors. This also fixes HashTable move constuction/assignment that previously PodAssigned the whole object including the AllocPolicy base.

Differential Revision: https://phabricator.services.mozilla.com/D36175
2019-06-27 11:56:26 +01:00
Jed Davis 35bc3bb540 Bug 1534780 - Move ipc::FileDescriptor's UniquePtr instance into MFBT as UniqueFileHandle. r=froydnj
MozReview-Commit-ID: 7bbGVIjTTaJ

Differential Revision: https://phabricator.services.mozilla.com/D26737

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:13 +00:00
Ciure Andrei 72f3f971fb Backed out 15 changesets (bug 1479960, bug 1426526, bug 1534780, bug 1536697) for causing build bustages CLOSED TREE
Backed out changeset 5645e0cc3915 (bug 1479960)
Backed out changeset a7c09894c6a0 (bug 1536697)
Backed out changeset 510f03381af9 (bug 1426526)
Backed out changeset 7cf4735a088f (bug 1426526)
Backed out changeset 41080844e645 (bug 1479960)
Backed out changeset fdba3c5f8fd0 (bug 1479960)
Backed out changeset 26a8ebcb2db4 (bug 1479960)
Backed out changeset d0d383e5bae1 (bug 1479960)
Backed out changeset c418095bb7b7 (bug 1479960)
Backed out changeset 7b78b1945532 (bug 1479960)
Backed out changeset c47d47d4073d (bug 1479960)
Backed out changeset 71253b62a633 (bug 1479960)
Backed out changeset ae525f20bdbb (bug 1479960)
Backed out changeset 7fba719355d7 (bug 1534780)
Backed out changeset 771db331860a (bug 1534780)
2019-06-20 19:54:57 +03:00
Jed Davis 19b7fc2cbd Bug 1534780 - Move ipc::FileDescriptor's UniquePtr instance into MFBT as UniqueFileHandle. r=froydnj
MozReview-Commit-ID: 7bbGVIjTTaJ

Differential Revision: https://phabricator.services.mozilla.com/D26737

--HG--
extra : moz-landing-system : lando
2019-06-17 02:19:35 +00:00
Jeff Walden 7761c7efbf Bug 1554362 - Accumulate external source text as either UTF-8 or UTF-16, in pref-controlled fashion, and then compile the accumulated text using corresponding JSAPI entrypoints without inflating UTF-8 to UTF-16. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34825

--HG--
extra : moz-landing-system : lando
2019-06-15 20:48:40 +00:00
Iain Ireland 00ae116a04 Bug 1548908: Add InfinityBits to FloatingPoint.h r=jwalden
We can't generate a constexpr uint64_t containing the bits for positive/negative infinity, because of a (very sensible) static_assert in SpecificNaNBits. This patch adds support to FloatingPoint.h for infinity. The next patch will use it to make JS::InfinityValue constexpr (to match JS::NaNValue).

Differential Revision: https://phabricator.services.mozilla.com/D29869

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:21 +00:00
Emilio Cobos Álvarez 53fa6bd77e Bug 1558440 - Use SaturateUint32 for the visible content heuristic. r=bzbarsky
Turns out we do have saturated arithmetic in mfbt, I just missed it.

Also, use just an uint32 for the heuristic. Text length is a uint32 anyway, and
it's unlikely we want to decide anything when the value is over the max uint32
value.

Differential Revision: https://phabricator.services.mozilla.com/D34496

--HG--
extra : moz-landing-system : lando
2019-06-11 15:02:17 +00:00
Aaron Klotz f5fd73482a Bug 1558272: Add Windows 10 May 2019 Update to WindowsVersion.h; r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D34390

--HG--
extra : moz-landing-system : lando
2019-06-10 18:52:38 +00:00
Mike Hommey 4c0ecc6982 Bug 1554063 - Move decimal to mozglue. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D32435

--HG--
rename : mfbt/decimal/Decimal.cpp => mozglue/misc/decimal/Decimal.cpp
rename : mfbt/decimal/Decimal.h => mozglue/misc/decimal/Decimal.h
rename : mfbt/decimal/UPSTREAM-GIT-SHA => mozglue/misc/decimal/UPSTREAM-GIT-SHA
rename : mfbt/decimal/comparison-with-nan.patch => mozglue/misc/decimal/comparison-with-nan.patch
rename : mfbt/decimal/fix-wshadow-warnings.patch => mozglue/misc/decimal/fix-wshadow-warnings.patch
rename : mfbt/decimal/mfbt-abi-markers.patch => mozglue/misc/decimal/mfbt-abi-markers.patch
rename : mfbt/decimal/moz-decimal-utils.h => mozglue/misc/decimal/moz-decimal-utils.h
rename : mfbt/decimal/to-moz-dependencies.patch => mozglue/misc/decimal/to-moz-dependencies.patch
rename : mfbt/decimal/update.sh => mozglue/misc/decimal/update.sh
rename : mfbt/decimal/zero-serialization.patch => mozglue/misc/decimal/zero-serialization.patch
extra : moz-landing-system : lando
2019-05-29 06:57:28 +00:00
Mihai Alexandru Michis 372773e7f5 Backed out changeset 3edc5be703be (bug 1554063) for mass test failures. CLOSED TREE
--HG--
rename : mozglue/misc/decimal/Decimal.cpp => mfbt/decimal/Decimal.cpp
rename : mozglue/misc/decimal/Decimal.h => mfbt/decimal/Decimal.h
rename : mozglue/misc/decimal/UPSTREAM-GIT-SHA => mfbt/decimal/UPSTREAM-GIT-SHA
rename : mozglue/misc/decimal/comparison-with-nan.patch => mfbt/decimal/comparison-with-nan.patch
rename : mozglue/misc/decimal/fix-wshadow-warnings.patch => mfbt/decimal/fix-wshadow-warnings.patch
rename : mozglue/misc/decimal/mfbt-abi-markers.patch => mfbt/decimal/mfbt-abi-markers.patch
rename : mozglue/misc/decimal/moz-decimal-utils.h => mfbt/decimal/moz-decimal-utils.h
rename : mozglue/misc/decimal/to-moz-dependencies.patch => mfbt/decimal/to-moz-dependencies.patch
rename : mozglue/misc/decimal/update.sh => mfbt/decimal/update.sh
rename : mozglue/misc/decimal/zero-serialization.patch => mfbt/decimal/zero-serialization.patch
2019-05-29 09:54:37 +03:00
Mike Hommey 66cb95a768 Bug 1554063 - Move decimal to mozglue. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D32435

--HG--
rename : mfbt/decimal/Decimal.cpp => mozglue/misc/decimal/Decimal.cpp
rename : mfbt/decimal/Decimal.h => mozglue/misc/decimal/Decimal.h
rename : mfbt/decimal/UPSTREAM-GIT-SHA => mozglue/misc/decimal/UPSTREAM-GIT-SHA
rename : mfbt/decimal/comparison-with-nan.patch => mozglue/misc/decimal/comparison-with-nan.patch
rename : mfbt/decimal/fix-wshadow-warnings.patch => mozglue/misc/decimal/fix-wshadow-warnings.patch
rename : mfbt/decimal/mfbt-abi-markers.patch => mozglue/misc/decimal/mfbt-abi-markers.patch
rename : mfbt/decimal/moz-decimal-utils.h => mozglue/misc/decimal/moz-decimal-utils.h
rename : mfbt/decimal/to-moz-dependencies.patch => mozglue/misc/decimal/to-moz-dependencies.patch
rename : mfbt/decimal/update.sh => mozglue/misc/decimal/update.sh
rename : mfbt/decimal/zero-serialization.patch => mozglue/misc/decimal/zero-serialization.patch
extra : moz-landing-system : lando
2019-05-29 00:59:20 +00:00
Sylvestre Ledru d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Andi-Bogdan Postelnicu 879d5c9a34 Bug 1553037 - clang-based disable static-analysis in `MOZ_REALLY_CRASH`. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D32132

--HG--
extra : moz-landing-system : lando
2019-05-22 12:50:43 +00:00
Brian Hackett a231842bb7 Bug 1547084 Part 1 - Remove recordReplayDirective interface and uses, r=mccr8.
--HG--
extra : rebase_source : 9fcddba95a4759fe6eb1222199ad8eeaaba2e146
2019-05-12 13:09:55 -10:00
Jon Coppeard dd429306b0 Bug 1550009 - Make HashTable call templated alloc/free methods with the same type r=froydnj?
Differential Revision: https://phabricator.services.mozilla.com/D30371

--HG--
extra : moz-landing-system : lando
2019-05-08 16:42:06 +00:00
Jim Blandy 54f04058eb Bug 1548133: mozilla::Variant::addTagToHash should be const-this. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D29423

--HG--
extra : moz-landing-system : lando
2019-05-01 12:13:23 +00:00
Emilio Cobos Álvarez b825dfe4cf Bug 1549694 - Don't use check as an identifier in IntegerRange.h, since it conflicts with system headers in Mac and Windows. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D30183

--HG--
extra : moz-landing-system : lando
2019-05-07 13:29:17 +00:00
Jean-Yves Avenard f558e67dd0 Bug 1548409 - Use MOZ_DIAGNOSTIC_ASSERT. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D29587

--HG--
extra : moz-landing-system : lando
2019-05-02 13:24:31 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Emilio Cobos Álvarez c7aac206e4 Bug 1546697 - EnumeratedArray should have a copy assignment operator. r=froydnj
I'll use this in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D28679

--HG--
extra : moz-landing-system : lando
2019-04-25 16:40:47 +00:00
Jim Blandy 52031426cb Bug 1546853: Implement mozilla::Variant::addTagToHash. r=froydnj
Define the Variant::addTagToHash method, which perturbs a hash value according
to the variant's current alternative's tag. This makes it easier to avoid
collisions in variants in which different alternatives might hash similarly.

Tests included.

Differential Revision: https://phabricator.services.mozilla.com/D28768

--HG--
extra : moz-landing-system : lando
2019-04-25 14:03:40 +00:00
Ryan VanderMeulen a49ab1efff Bug 1544980 - Update lz4 to version 1.9.1. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28590

--HG--
extra : moz-landing-system : lando
2019-04-24 10:23:54 +00:00
Geoff Brown 323e21aa9d Bug 1546012 - Avoid slow sleeps on Android in TestSPSCQueue; r=padenot
Reducing the sleep to 0 on Android results in a dramatic reduction in run time, and the test
passes consistently.

Differential Revision: https://phabricator.services.mozilla.com/D28296

--HG--
extra : moz-landing-system : lando
2019-04-23 13:39:36 +00:00
Brian Hackett 9a51c20aa1 Bug 1544170 Part 1 - Notify record/replay system about parsed style sheets, r=heycam.
Differential Revision: https://phabricator.services.mozilla.com/D27408

--HG--
extra : rebase_source : 49fef2849dc402bedf0ffb59f7db305365426cda
2019-04-12 16:33:00 -10:00
Botond Ballo 55b741f5f7 Bug 1543501 - Make MOZ_DBG() work on Android. r=heycam
stderr does not go anywhere by default on Android. Debugging output is
conventionally sent to the Android log via special functions like
__android_log_print.

We already have logic for handling this in nsCRTGlue's printf_stderr, but
I don't think we can use that in MFBT.

Differential Revision: https://phabricator.services.mozilla.com/D26985

--HG--
extra : moz-landing-system : lando
2019-04-12 16:48:51 +00:00
Botond Ballo 422903589d Bug 1543501 - Print a 'token' that allows output from MOZ_DBG() to be easily grepped for among other output. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D26984

--HG--
extra : moz-landing-system : lando
2019-04-12 16:49:56 +00:00
Cameron McCormack ad0b101ef6 Bug 1543582 - Only include quotes around XPCOM strings in MOZ_DBG, not operator<<. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27031

--HG--
extra : moz-landing-system : lando
2019-04-11 23:44:57 +00:00
Daniel Varga 6d6f6dadce Backed out 4 changesets (bug 1458385) for nightly updates fail. a=backout
Backed out changeset 09338587b68e (bug 1458385)
Backed out changeset f7791b680d46 (bug 1458385)
Backed out changeset cc06a7beb3d1 (bug 1458385)
Backed out changeset 3b10487587c3 (bug 1458385)
2019-04-10 21:09:46 +03:00
Tom Prince b4e1868e59 Bug 1458385: Package mar and mbsdiff as a toolchain; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D24229

--HG--
extra : moz-landing-system : lando
2019-04-06 05:49:31 +00:00
Sylvestre Ledru 03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26280

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
shindli 45ec6114d3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-04-06 00:51:18 +03:00
David Major bd688314c9 Bug 1536675 - Inline MOZ_Crash even in debug builds r=froydnj
We want MOZ_Crash frames to stay out of Taskcluster logs even on debug builds. Perhaps you could say, _especially_ on debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D26352

--HG--
extra : moz-landing-system : lando
2019-04-05 19:25:55 +00:00
Jan Varga 8651b25d09 Bug 1542154 - Add MOZ_DIAGNOSTIC_ALWAYS_TRUE; r=froydnj 2019-04-05 16:44:49 +02:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Ciure Andrei 58c8915ecd Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-04-04 00:57:38 +03:00
Daniel Varga f89113118b Merge mozilla-central to mozilla-inbound. a=merge 2019-04-03 09:18:15 +03:00
David Major c7531ea325 Bug 1536675 - Take the crashing out of MOZ_CrashPrintf r=froydnj
It would be helpful if MOZ_CRASH_UNSAFE_PRINTF would do its crashing inline at the caller, so that CI failure logs can blame the right code.

Before this patch, MOZ_CRASH_UNSAFE_PRINTF calls MOZ_CrashPrintf, which does the printf work and crashes.

This patch pulls out the crashing piece at the end, so that MOZ_CrashPrintf only does the printf work, and returns the string to the caller, who will MOZ_Crash inline.

Differential Revision: https://phabricator.services.mozilla.com/D25329

--HG--
extra : moz-landing-system : lando
2019-04-02 19:20:41 +00:00
Jan Varga 270308cb07 Bug 1540577 - Add MOZ_DIAGNOSTIC_ASSERT_IF; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D25548
2019-04-01 01:17:07 +02:00
Mike Hommey 14f091e326 Bug 1541302 - Don't build RecordReplay.cpp during a --enable-project=memory build. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D25895

--HG--
extra : moz-landing-system : lando
2019-04-03 01:43:37 +00:00
Jeff Gilbert 4a9effbea9 Bug 1540357 - Fix implicit int truncation in dom/canvas's mfbt/* includes. r=froydnj
Depends on D25500

Differential Revision: https://phabricator.services.mozilla.com/D25501

--HG--
extra : moz-landing-system : lando
2019-04-02 17:00:53 +00:00
Gerald Squelart 7fca0d0d21 Bug 1429613 - Variadic Variant::match, takes one function object per option - r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24890

--HG--
extra : moz-landing-system : lando
2019-04-02 11:53:51 +00:00
Gerald Squelart e2d15a1cfb Bug 1429613 - Variant matcher callbacks renamed from `match` to `operator()` - r=froydnj
Mechanical change from Matcher::match(...) to Matcher::operator()(...).
This will now permit the use of generic lambdas, and facilitate the
implementation of multi-lambda match.

Differential Revision: https://phabricator.services.mozilla.com/D24889

--HG--
extra : moz-landing-system : lando
2019-04-02 11:53:47 +00:00
Narcis Beleuzu d20e1695b0 Merge autoland to mozilla-central. a=merge 2019-03-30 23:43:56 +02:00
Cameron McCormack b57c41bebd Bug 1538081 - Followup fixes.
Differential Revision: https://phabricator.services.mozilla.com/D25505

--HG--
extra : moz-landing-system : lando
2019-03-30 07:45:36 +00:00
Cameron McCormack 714e4a84fb Bug 1538081 - Part 4: Tests. r=froydnj,gerald
Depends on D25024

Differential Revision: https://phabricator.services.mozilla.com/D25025

--HG--
extra : moz-landing-system : lando
2019-03-30 04:24:34 +00:00
Cameron McCormack eedb6aebd4 Bug 1538081 - Part 3: Add operator<<(ostream&) definitions for a few common types. r=froydnj,gerald
Depends on D25023

Differential Revision: https://phabricator.services.mozilla.com/D25024

--HG--
extra : moz-landing-system : lando
2019-03-30 04:26:26 +00:00
Cameron McCormack a635fa2855 Bug 1538081 - Part 2: Add MOZ_DEFINE_DBG. r=froydnj,gerald
Depends on D24583

Differential Revision: https://phabricator.services.mozilla.com/D25023

--HG--
extra : moz-landing-system : lando
2019-03-30 04:25:15 +00:00
Cameron McCormack 9796d08b83 Bug 1538081 - Part 1: Add MOZ_DBG macro. r=froydnj,gerald
Differential Revision: https://phabricator.services.mozilla.com/D24583

--HG--
extra : moz-landing-system : lando
2019-03-30 04:25:13 +00:00
Ciure Andrei 615006146b Backed out 4 changesets (bug 1538081) for causing BaseElf.cpp bustages CLOSED TREE
Backed out changeset ced61a86c74c (bug 1538081)
Backed out changeset d6d331abbf0e (bug 1538081)
Backed out changeset 26df801e44db (bug 1538081)
Backed out changeset 113ac188a69e (bug 1538081)
2019-03-30 03:02:15 +02:00
Cameron McCormack 665d6f124d Bug 1538081 - Part 4: Tests. r=froydnj,gerald
Depends on D25024

Differential Revision: https://phabricator.services.mozilla.com/D25025

--HG--
extra : moz-landing-system : lando
2019-03-30 00:21:26 +00:00
Cameron McCormack 91e3ec9952 Bug 1538081 - Part 3: Add operator<<(ostream&) definitions for a few common types. r=froydnj,gerald
Depends on D25023

Differential Revision: https://phabricator.services.mozilla.com/D25024

--HG--
extra : moz-landing-system : lando
2019-03-30 00:21:24 +00:00
Cameron McCormack 296d51aa84 Bug 1538081 - Part 2: Add MOZ_DEFINE_DBG. r=froydnj,gerald
Depends on D24583

Differential Revision: https://phabricator.services.mozilla.com/D25023

--HG--
extra : moz-landing-system : lando
2019-03-30 00:21:17 +00:00
Cameron McCormack 3bb950d9a6 Bug 1538081 - Part 1: Add MOZ_DBG macro. r=froydnj,gerald
Differential Revision: https://phabricator.services.mozilla.com/D24583

--HG--
extra : moz-landing-system : lando
2019-03-30 00:21:14 +00:00
Jeff Gilbert 112e44b69e No bug - clang-format -p mfbt 2019-03-29 23:42:40 -07:00
Oana Pop Rus d9ec36d04f Backed out 3 changesets (bug 1458385) for windows partial bustages. a=backout
Backed out changeset 8036c03c3b51 (bug 1458385)
Backed out changeset 99fa5539c2bd (bug 1458385)
Backed out changeset 9a5f255979c2 (bug 1458385)
2019-03-28 15:13:13 +02:00
Gerald Squelart d8e4582b6c Bug 1539322 - Add Vector::eraseIf and Vector::eraseIfEqual - r=froydnj
Convenience functions to erase elements based on a predicate, or by comparing to
a value. They are optimized to use the minimal amount of moves necessary.

Differential Revision: https://phabricator.services.mozilla.com/D25016

--HG--
extra : moz-landing-system : lando
2019-03-28 01:00:35 +00:00
Tom Prince fbb8603385 Bug 1458385: Package mar and mbsdiff as a toolchain; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D24229

--HG--
extra : moz-landing-system : lando
2019-03-27 22:30:44 +00:00
Alex Gaynor 289ff19535 Bug 1533777 - use a release assert in CheckedInt::value; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22970

--HG--
extra : source : f9c865b93ecd4d184b50de9a5ca9da15928c27a8
extra : amend_source : 40e1cb24abdde9a49f113ed012d19d830e3a5237
2019-03-27 13:30:23 +00:00
Sebastian Hengst bf943c64c1 Backed out changeset f9c865b93ecd (bug 1533777) because it landed with the wrong patch author. a=backout
--HG--
extra : amend_source : 7e92c9fe511586260e66a739bcecdb8d2e6579df
2019-03-26 21:38:23 +01:00
Sebastian Hengst 380873f20a Bug 1533777 - use a release assert in CheckedInt::value; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22970

--HG--
extra : moz-landing-system : lando
2019-03-27 13:30:23 +00:00
Cosmin Sabou 3d469329a4 Merge mozilla-inbound to mozilla-central. a=merge 2019-03-27 06:45:13 +02:00
violet c9809c7c5a Bug 1469155 - Add overloading for std::nullptr_t for RangedPtr equality operator r=froydnj
Templated pointer can't match |nullptr|, we should add overloading for
std::nullptr_t specifically to be able to support |nullptr|.

Differential Revision: https://phabricator.services.mozilla.com/D24925

--HG--
extra : moz-landing-system : lando
2019-03-26 19:10:24 +00:00
dOn'tReallycAre 2823fecb3a Bug 1353767 - BufferList methods that can OOM should all be MOZ_MUST_USE. r=billm
The Pickle methods can use MOZ_ALWAYS_TRUE because the BufferList is
infallible, so the WriteBytes calls will never fail.
2019-03-26 13:24:00 +02:00
David Major 80ccc20c66 Bug 1539241 - Remove MOZ_IS_MSVC for being unused and misleadingly named r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24954

--HG--
extra : moz-landing-system : lando
2019-03-26 19:42:26 +00:00
Jeff Walden 83cdc4ca37 Bug 1526507 - Use std::exp2{,f}(n) instead of pow{,f}(2.0, n) in TestFloatingPoint.cpp to be (hopefully) more resilient against standard library imprecision in the latter. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D24403

--HG--
extra : moz-landing-system : lando
2019-03-25 17:54:25 +00:00
Jeff Walden 84b07b0389 Bug 1538098 - Backed out changeset 0a0194cd76a7 for some in-the-field bustage that isn't immediately diagnosable and fixable, before the wekeend. r=crashes
--HG--
extra : amend_source : ef5e1c14b897af80f410365d5afd99ce5dc96ab2
2019-03-22 13:48:06 -07:00
Jeff Walden 70e73da609 Bug 1531638 - Make Vector::begin() always return a non-null pointer, to accommodate users that need/want this. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21825

--HG--
extra : rebase_source : 5682d209aef3c10b204678c8865758708f2a7e3e
2019-02-28 21:30:49 -08:00
shindli 12c0629a98 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : js/src/tests/non262/fields/basic.js => js/src/jit-test/tests/fields/basic.js
rename : js/src/tests/non262/fields/literal.js => js/src/jit-test/tests/fields/literal.js
rename : js/src/tests/non262/fields/mixed_methods.js => js/src/jit-test/tests/fields/mixed_methods.js
rename : js/src/tests/non262/fields/quirks.js => js/src/jit-test/tests/fields/quirks.js
2019-03-21 06:36:37 +02:00
Jeff Walden 525cd3e150 Bug 1531638 - Make Vector::begin() always return a non-null pointer, to accommodate users that need/want this. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21825

--HG--
extra : rebase_source : c4c70e38ef98e544af23f1a33c17dd12c04c2e9e
2019-02-28 21:30:49 -08:00
Ciure Andrei b17f2b8aba Backed out 2 changesets (bug 1257982) for causing multiple ProtectedData.cpp asertion failures CLOSED TREE
Backed out changeset a62af21dfc4b (bug 1257982)
Backed out changeset 0ce0c7c9a1b6 (bug 1257982)
2019-03-20 02:00:10 +02:00
Steve Fink c75e825207 Bug 1257982 - [hazards] Inherit template attrs for plain HashMap/HashSet r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D23621
2019-03-19 15:55:13 -07:00
Valentin Gosu 87e9bbff49 Bug 1532253 - Add NS_NewURIOnAnyThread r=baku
Differential Revision: https://phabricator.services.mozilla.com/D22137

--HG--
extra : moz-landing-system : lando
2019-03-19 15:11:31 +00:00
Coroiu Cristina 716cbf554c Backed out 2 changesets (bug 1257982) for build bustage at build/src/js/src/frontend/ParseContext.h on a CLOSED TREE
Backed out changeset e73fdb7ff05d (bug 1257982)
Backed out changeset 13425f1eca22 (bug 1257982)
2019-03-19 10:35:21 +02:00
Steve Fink c10602d229 Bug 1257982 - [hazards] Inherit template attrs for plain HashMap/HashSet r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D23619

--HG--
extra : moz-landing-system : lando
2019-03-18 21:37:04 +00:00
Boris Zbarsky e348ad0b6c Improve the documentation around the MOZ_CAN_RUN_SCRIPT analysis. No bug. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23762

--HG--
extra : moz-landing-system : lando
2019-03-16 12:52:33 +00:00
Coroiu Cristina c5833bc810 Backed out changeset 2f2a20c16289 (bug 1533777) for crashing youtube on request by jya a=backout 2019-03-13 08:52:21 +02:00
Oana Pop Rus 38d2d04978 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-12 06:53:06 +02:00
Jeff Walden b299df2f1a Bug 1533636 - Don't bother explicitly aligning when XDRing char16_t data: the operations we use to perform the little/native-endian conversion will correctly translate into, or translate out of, unaligned memory. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D22654

--HG--
extra : rebase_source : 2013431c35fff24bb003671dc257005903ff3c07
2019-03-06 13:36:47 -08:00
Alex Gaynor ca0c1fc191 Bug 1533777 - use a release assert in CheckedInt::value; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22970

--HG--
extra : moz-landing-system : lando
2019-03-11 13:55:28 +00:00
Jeff Walden cc8118aa28 Bug 1533636 - Define HashStringUntilZero and HashStringKnownLength template functions for code that wishes to invoke the HashString algorithm on non-pointer iterator types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22652

--HG--
extra : rebase_source : 68359815e1edffc8e2489d6cd817adfbdd628818
2019-03-05 10:11:32 -08:00
Gurzau Raul 7c8d994e63 Backed out 4 changesets (bug 1532253) for Windows bustage at Unified_cpp_netwerk_base2.i_o on a CLOSED TREE.
Backed out changeset 498d0bcc8ce8 (bug 1532253)
Backed out changeset 8e10880ff30b (bug 1532253)
Backed out changeset 0491d225285c (bug 1532253)
Backed out changeset 5384779a3b1f (bug 1532253)
2019-03-11 15:22:39 +02:00
Valentin Gosu 815b481df4 Bug 1532253 - Add NS_NewURIOnAnyThread r=baku!
Differential Revision: https://phabricator.services.mozilla.com/D22137

--HG--
extra : source : d33b895e5ebeef0ade779ad35323d698f710a5a5
extra : intermediate-source : 82c14f26f6de19645d4e0f4a5f4d44eaa99536f3
2019-03-05 14:01:58 +01:00
Mike Hommey 8368691a2a Bug 1434526 - Make MOZ_SIGNAL_TRAMPOLINE Android-only. r=gsvelto
Bug 1463035 exists to remove it entirely, because as mentioned in bug
1238661 comment 4, we don't actually need this workaround anymore. But
that bug has been blocked for a while because the Android emulator
images we use for testing, for some reason, use a kernel older than any
real device using the same version of Android would use.

Let's however fix the problems it causes with GCC on non-Android ARM
Linux by making it Android-only, rather than removing it entirely.

Differential Revision: https://phabricator.services.mozilla.com/D24134

--HG--
extra : moz-landing-system : lando
2019-03-20 09:07:16 +00:00
Jan de Mooij 446dc0db91 Bug 1533070 - Get rid of static initializers in GC.cpp by marking some functions/statics constexpr. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D22335

--HG--
extra : moz-landing-system : lando
2019-03-06 17:38:11 +00:00
Jeff Walden 7b8ce42e6e Bug 1453456 - Remove nsCRT::IsAscii(null-terminated string) in favor of mozilla::IsAsciiNullTerminated. r=froydnj 2019-02-25 12:22:24 -08:00
Nicholas Nethercote f476546aaa Bug 1530311 - Add a length check to HashTable::reserve(). r=luke
Also add an assertion to a similar function in PLDHashTable.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D21167

--HG--
extra : moz-landing-system : lando
2019-02-27 00:08:13 +00:00
Daniel Varga 30780abeeb Merge mozilla-inbound to mozilla-central. a=merge 2019-02-15 03:41:17 +02:00
Mike Hommey ef3ad686ee Bug 1512504 - Remove support for MSVC. r=froydnj
Consequently, this removes:
- MOZ_LIBPRIO, which is now always enabled.
- non_msvc_compiler, which is now always true.
- The cl.py wrapper, since it's not used anymore.
- CL_INCLUDES_PREFIX, which was only used for the cl.py wrapper.
- NONASCII, which was only there to ensure CL_INCLUDES_PREFIX still
  worked in non-ASCII cases.

This however keeps a large part of detecting and configuring for MSVC,
because we still do need it for at least headers, libraries, and midl.

Depends on D19614

Differential Revision: https://phabricator.services.mozilla.com/D19615

--HG--
extra : moz-landing-system : lando
2019-02-14 21:45:27 +00:00
Chris Peterson 8e1848413c Bug 1507049 - Rename MOZ_CRASH_UNSAFE_OOL MOZ_CRASH_UNSAFE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D18515

--HG--
extra : rebase_source : e8ef6eec0f7542bb381e2da81ae6431b2828aabc
extra : source : a8c262b4a2579e6def1b3a5a8220f5197b443e34
2019-02-03 00:09:37 -08:00
Chris Peterson cedea8a566 Bug 1507049 - Rename MOZ_CrashOOL MOZ_Crash. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D18513

--HG--
extra : rebase_source : 00910ccc380f24a12181fef2a72d84c1170cb9fe
extra : source : d39e75533e61b315c9ee0000ea74eca3bf474f58
2019-02-03 00:00:12 -08:00
Tooru Fujisawa 72222a022c Bug 1524755 - Use ptrdiff_t instead in RangedPtr. r=jwalden 2019-02-08 12:13:23 +09:00
Aaron Klotz 607ac36e06 Bug 1528045: Add detection for Win10 1809 to WindowsVersion.h; r=froydnj 2019-02-05 15:10:11 -07:00
Sylvestre Ledru 14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Nathan Froyd 0d56a7008a Bug 1523949 - part 1 - make MOZ_THREAD_LOCAL name lookups work anywhere; r=erahm
MOZ_THREAD_LOCAL currently assumes its invocations live in the global
namespace, which may not always be true, e.g. when declaring a static
class member whose enclosing class lives in `namespace mozilla` or
similar.  We should qualify the name lookups required to always start
from the global namespace to avoid such problems.
2019-01-30 17:26:27 -05:00
Cosmin Sabou 7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Andrew McCreight 9e451b1da0 Bug 1517611 - Cycle collect WebAuthnManager and U2F more. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17026

--HG--
extra : moz-landing-system : lando
2019-01-18 23:21:46 +00:00
David Major d3a71fc36a Bug 1520241 - Avoid slow sleeps on Windows in TestSPSCQueue.exe r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D16583

--HG--
extra : moz-landing-system : lando
2019-01-16 12:04:13 +00:00
Mike Hommey 70f1ad55e1 Bug 1519307 - Add a new project to build useful parts of breakpad independently. r=froydnj
With `ac_add_options --enable-project=tools/crashreporter` in a
mozconfig, `./mach build` builds minidump_stackwalk, dump_syms
and fileid.

One caveat is that due to limitation in how the build system works
currently, it's cumbersome to keep dump_syms as a host program for
Gecko, and to make it a target program for this project. For now,
keep it as a host program. We're not going to use it on automation,
but it's still convenient to have for quick local builds (I've had
to resort to awful hacks downstream).

Differential Revision: https://phabricator.services.mozilla.com/D16299

--HG--
extra : moz-landing-system : lando
2019-01-11 16:01:15 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Olli Pettay 827502c9a8 Bug 1517237 - Make move assignment of RefPtr to have the same behavior as nsCOMPtr's, r=froydnj 2019-01-02 21:44:32 +02:00
Sylvestre Ledru b2099f351e Bug 1515434 - Only activate the deactivation of -Wc++2a-compat from clang 6 r=botond
Differential Revision: https://phabricator.services.mozilla.com/D15012

--HG--
extra : moz-landing-system : lando
2018-12-19 21:18:46 +00:00
Sylvestre Ledru bd9482e301 Bug 1509926 - Disable the warning -Wc++2a-compat on some files r=dholbert
Fails with clang trunk:
"type of UTF-8 string literal will change from array of const char to array of const char8_t in C++2a"
otherwise

Differential Revision: https://phabricator.services.mozilla.com/D14696

--HG--
extra : moz-landing-system : lando
2018-12-17 06:56:45 +00:00
Sylvestre Ledru 6f45c666bc Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D14595

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Nathan Froyd 0c1169eedc Bug 1508873 - part 3 - reorganize HashTable's internal storage; r=luke
As discussed in the previous commit message, HashTableEntry wastes space
for common entry types.  This commit reorganizes the internal storage to
store all the hashes packed together, followed by all the entries, which
eliminates the aforementioned waste.
2018-12-13 12:21:19 -05:00
Nathan Froyd 6b20e36d68 Bug 1508873 - part 2 - convert HashTable to work primarily in terms of slots; r=luke
HashTableEntry's data layout currently wastes a fair amount of space due
to ABI-mandated padding.  For instance, HashTableEntry<T*> on a 64-bit
platform looks like:

class HashTableEntry {
  HashNumber mKeyHash;
  // Four bytes of wasted space here to pad mValueData to the correct place.
  unsigned char mValueData[sizeof(T*)];
};

This wasted space means that sets of pointers backed by
mozilla::HashTable waste a quarter of their entry storage space.  Maps
of pointers to pointers waste a sixth of their entry storage space.
We'd like to fix this by packing all the cached hashes together,
followed by all the hash table entries.

As a first step to laying out the hash table storage differently, we
have to make HashTable not access entries directly, but go through an
abstraction that represents the key and the entry.  We call this
abstraction "slots".  This commit is similar to the change done for
PLDHashTable previously.

Parts of HashTable still work in terms of Entry; the creation and
destruction of tables was not worth changing here.  We'll address that
in the next commit.
2018-12-13 12:21:19 -05:00
Nathan Froyd 1d59bcc108 Bug 1508873 - part 1 - statically assert alignment for hashtable entries; r=luke
We do this to make our lives easier in later patches; this check
guarantees that we don't need padding between the block of cached hash
values and the block of entries immediately after it.
2018-12-13 12:21:19 -05:00
Cosmin Sabou 46fe1d73a2 Backed out 3 changesets (bug 1508873) for spidermonkey build bustages. CLOSED TREE
Backed out changeset a356b2566ae2 (bug 1508873)
Backed out changeset 4bb5dd072865 (bug 1508873)
Backed out changeset a6657732fdbe (bug 1508873)
2018-12-12 22:09:30 +02:00
Nathan Froyd ba32deb674 Bug 1508873 - part 3 - reorganize HashTable's internal storage; r=luke
As discussed in the previous commit message, HashTableEntry wastes space
for common entry types.  This commit reorganizes the internal storage to
store all the hashes packed together, followed by all the entries, which
eliminates the aforementioned waste.
2018-12-12 14:57:21 -05:00
Nathan Froyd 27902c8e43 Bug 1508873 - part 2 - convert HashTable to work primarily in terms of slots; r=luke
HashTableEntry's data layout currently wastes a fair amount of space due
to ABI-mandated padding.  For instance, HashTableEntry<T*> on a 64-bit
platform looks like:

class HashTableEntry {
  HashNumber mKeyHash;
  // Four bytes of wasted space here to pad mValueData to the correct place.
  unsigned char mValueData[sizeof(T*)];
};

This wasted space means that sets of pointers backed by
mozilla::HashTable waste a quarter of their entry storage space.  Maps
of pointers to pointers waste a sixth of their entry storage space.
We'd like to fix this by packing all the cached hashes together,
followed by all the hash table entries.

As a first step to laying out the hash table storage differently, we
have to make HashTable not access entries directly, but go through an
abstraction that represents the key and the entry.  We call this
abstraction "slots".  This commit is similar to the change done for
PLDHashTable previously.

Parts of HashTable still work in terms of Entry; the creation and
destruction of tables was not worth changing here.  We'll address that
in the next commit.
2018-12-12 14:57:21 -05:00
Nathan Froyd 05c72d126b Bug 1508873 - part 1 - statically assert alignment for hashtable entries; r=luke
We do this to make our lives easier in later patches; this check
guarantees that we don't need padding between the block of cached hash
values and the block of entries immediately after it.
2018-12-12 14:57:21 -05:00
Henri Sivonen c58ccc7e2b Bug 1512155 - Introduce a movable type that combines mozilla::UniquePtr<T[]> and its length. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D13795

--HG--
extra : moz-landing-system : lando
2018-12-07 08:28:08 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13193

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Ehsan Akhgari 0ad55ab74f Bug 1510513 - Retain the formatting of MOZ_DEFINE_ENUM_* macros r=sylvestre
These macros tend to be handled quite poorly since the clang-format
tokenizer cannot figure out how to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D13179

--HG--
extra : moz-landing-system : lando
2018-11-28 09:14:19 +00:00
Jeff Walden 5499a179ff Bug 1508725 - Adjust mozilla::FloatingPoint<T>'s definition so only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. r=froydnj
--HG--
extra : rebase_source : fe3e97b77945bcffd5f4415351541fcd5875bdbb
2018-06-07 13:25:12 -07:00
Nathan Froyd 213e4e231d Bug 1509927 - use a little more KnownNotNull placement new in MFBT; r=njn
This change avoids some useless null checks.
2018-11-26 18:51:35 -05:00
Brian Hackett 733258b327 Bug 1505935 Part 4 - Inform the record/replay system about all script compilations, r=jorendorff.
--HG--
extra : rebase_source : cc0d08d1133be5b99c863e6ba5879010b8de084f
2018-11-17 10:55:06 -10:00
Jeff Walden e36d4a90d5 Bug 1504802 - Translate Unit-relevant offsets into sourceUnits, into char16_t-relevant offsets with respect to the just-computed lineOfContext, when reporting a syntax error and adding a line of context to it. r=arai
--HG--
extra : rebase_source : 6afac624e4ab295a4df74759a4297294c5923006
2018-11-05 18:55:56 -08:00
Aaron Klotz 152c7bf8a5 Bug 1508460: Add specialization for void* to HasFreeLSB; r=froydnj
HasFreeLSB currently fails for any types that map to void*. Unless we fix this,
we can't use certain types as template parameters for mozilla::Result.

Differential Revision: https://phabricator.services.mozilla.com/D12358

--HG--
extra : moz-landing-system : lando
2018-11-19 23:56:54 +00:00
Ted Campbell 59d3110a5a Bug 1508180 - Use uppercase macro names in mfbt/RecordReplay.h r=bhackett
Rename MOZ_MakeRecordReplayWrapper to MOZ_MAKE_RECORD_REPLAY_WRAPPER so
that clang-format doesn't mangle code.

Differential Revision: https://phabricator.services.mozilla.com/D12233

--HG--
extra : moz-landing-system : lando
2018-11-19 18:52:49 +00:00
Brian Hackett 6afedf5456 Bug 1505935 Part 1 - Rename IsInternalScript API, r=lsmyth.
--HG--
extra : rebase_source : 4e182c0ee98d654dd7755c7c5bce9391d6e04a0f
2018-11-10 15:26:52 -10:00
arthur.iakab c0b26c4076 Merge inbound to mozilla-central a=merge 2018-11-15 11:54:15 +02:00
Mike Hommey 1c6d1f8586 Bug 1496503 - Change the rust panic hook to delegate to Gecko's crash code. r=froydnj
The current rust panic hook keeps a string for the crash reporter, and
goes on calling the default rust panic hook, which prints out a crash
stack...  when RUST_BOOTSTRAP is set *and* when that works. Notably, on
both mac and Windows, it only really works for local builds, but fails
for debug builds from automation, although on automation itself, we also
do stackwalk from crash minidumps, which alleviates the problem.
Artifact debug builds are affected, though.

More importantly, C++ calls to e.g. MOZ_CRASH have a similar but
different behavior, in that they dump a stack trace on debug builds, by
default (with exceptions, see below for one). The format of those stack
traces is understood by the various fix*stack*py scripts under
tools/rb/, that are used by the various test harnesses both on
automation and locally.

Additionally, the current rust panic hook, as it calls the default rust
panic hook, ends up calling abort() on non-Windows platforms, which ends
up being verbosely redirected to mozalloc_abort per
https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/memory/mozalloc/mozalloc_abort.cpp#79
which then calls MOZ_CRASH. Theoretically, /that/ would also print a
stack trace, but doesn't because currently the stack trace printing code
lives in libxul, and MOZ_CRASH only calls it when compiled from
libxul-code, which mozalloc_abort is not part of.

With this change, we make the rust panic handler call back into
MOZ_CRASH directly. This has multiple advantages:
- This is more consistent cross-platforms (Windows is not special
anymore).
- This is more consistent between C++ and rust (stack traces all look
the same, and can all be post-processed by fix*stack*py if need be)
- This is more consistent in behavior, where debug builds will show
those stack traces without caring about environment variables.
- It demangles C++ symbols in rust-initiated stack traces (for some
reason that didn't happen with the rust panic handler)

A few downsides:
- the loss of demangling for some rust symbols.
- the loss of addresses in the stacks, although they're not entirely
useful
- extra empty lines.

The first should be fixable later one. The latter two are arguably
something that should be consistent across C++ and rust, and should be
changed if necessary, independently of this patch.

Depends on D11719

Depends on D11719

Differential Revision: https://phabricator.services.mozilla.com/D11720

--HG--
extra : moz-landing-system : lando
2018-11-14 22:35:33 +00:00
Mike Hommey 08f7e29c6a Bug 1496503 - Use MOZ_CrashOOL in MOZ_CrashPrintf. r=froydnj
Because we don't really need all this repetition.

Depends on D11718

Depends on D11718

Differential Revision: https://phabricator.services.mozilla.com/D11719

--HG--
extra : moz-landing-system : lando
2018-11-14 22:35:25 +00:00
Mike Hommey b60c5c12e4 Bug 1496503 - Move MOZ_CrashOOL to Assertions.h. r=froydnj
Ideally, we'd want the function to stay in Assertions.cpp, but that's
only part of MFBT proper, and that doesn't have access to WalkTheStack
like MOZ_CRASH has from being in Assertion.h, when included from Gecko
code. Moving WalkTheStack to mozglue, putting it close together with
MozStackWalk would be prefered, but that causes problems linking MFBT
tests (which don't have access to mozglue), and other things.

Overall, this was too deep a rabbit hole, and moving MOZ_CrashOOL to
Assertions.h is much simpler. Since it's essentially the same as
MOZ_CRASH, except it allows non-literal strings, we can make it inlined,
and leave it to the compiler to drop the filename argument when it's not
used.

Differential Revision: https://phabricator.services.mozilla.com/D11718

--HG--
extra : moz-landing-system : lando
2018-11-14 22:35:23 +00:00