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

1783 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa afa6435815 Bug 1585585 - Add {MOZ_LIKELY,MOZ_UNLIKELY} to Result::{isOk,isErr} consumers. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D48136

--HG--
extra : moz-landing-system : lando
2019-10-10 23:46:42 +00:00
Peter Van der Beken 22e4870bda Bug 1584256 - Add IPDLParamTraits for Variant. r=nika,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D47607

--HG--
extra : moz-landing-system : lando
2019-10-08 16:03:11 +00:00
Ryan VanderMeulen c63de82d8d Bug 1587187 - Update xxHash to version 0.7.2. r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D48596

--HG--
extra : moz-landing-system : lando
2019-10-08 19:53:34 +00:00
Sylvestre Ledru f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Adrian Wielgosik c763074930 Bug 1583953 - avoid assert-heavy iterators in Span comparisons. r=jwalden
This lets us avoid pointlessly checking release assertions in a safe comparison loop.
In particular, for Span<char>, this lets the compiler use memcmp, speeding up comparisons by over an order of magnitude.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 02:08:11 +00:00
Doug Thayer a74957c6e6 Bug 1550108 - Change StartupCache format from zip to custom r=froydnj
I am not aware of anything that depends on StartupCache being a
zip file, and since I want to use lz4 compression because inflate
is showing up quite a lot in profiles, it's simplest to just use
a custom format. This loosely mimicks the ScriptPreloader code,
with a few diversions:

- Obviously the contents of the cache are compressed. I used lz4
  for this as I hit the same file size as deflate at a compression
  level of 1, which is what the StartupCache was using previously,
  while decompressing an order of magnitude faster. Seemed like
  the most conservative change to make. I think it's worth
  investigating what the impact of slower algs with higher ratios
  would be, but for right now I settled on this. We'd probably
  want to look at zstd next.
- I use streaming compression for this via lz4frame. This is not
  strictly necessary, but has the benefit of not requiring as
  much memory for large buffers, as well as giving us a built-in
  checksum, rather than relying on the much slower CRC that we
  were doing with the zip-based approach.
- I coded the serialization of the headers inline, since I had to
  jump back to add the offset and compressed size, which would
  make the nice Code(...) method for the ScriptPreloader stuff
  rather more complex. Open to cleaner solutions, but moving it
  out just felt like extra hoops for the reader to jump through
  to understand without the benefit of being more concise.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 20:44:59 +00:00
Doug Thayer 1678c5e378 Bug 1550108 - Add mapErr method to Result r=froydnj
Adds an explicit error mapping function to Result, to simplify
using MOZ_TRY... macros.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 20:44:50 +00:00
Doug Thayer 534ac9e360 Bug 1550108 - Pull in secondary lz4 libraries r=glandium
I opted to go with what I perceived as the more expedient route
of leaving lz4 roughly where it is and just adding to that. The
biggest complication was xxhash, which is included elsewhere.
I'm not generally proficient with build-related things though so
my solution may be wrong and not just ugly.

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

--HG--
rename : mfbt/lz4.c => mfbt/lz4/lz4.c
rename : mfbt/lz4.h => mfbt/lz4/lz4.h
extra : moz-landing-system : lando
2019-10-04 20:44:08 +00:00
Cosmin Sabou 14938bad3b Backed out 10 changesets (bug 1550108) for causing build bustages on StartupCache.cpp.
Backed out changeset cbadfa2bbd7e (bug 1550108)
Backed out changeset 2560f0ab6ebf (bug 1550108)
Backed out changeset 0a1fa8d8bb3c (bug 1550108)
Backed out changeset 62416909cf67 (bug 1550108)
Backed out changeset 60991713b1e2 (bug 1550108)
Backed out changeset f950e30afd90 (bug 1550108)
Backed out changeset e63d0a1fec38 (bug 1550108)
Backed out changeset 7a009d42e7e7 (bug 1550108)
Backed out changeset 395affa4c205 (bug 1550108)
Backed out changeset 0fd41e9dbd2a (bug 1550108)

--HG--
rename : mfbt/lz4/lz4.c => mfbt/lz4.c
rename : mfbt/lz4/lz4.h => mfbt/lz4.h
2019-09-29 01:14:31 +03:00
Doug Thayer eb024f4ee6 Bug 1550108 - Change StartupCache format from zip to custom r=froydnj
I am not aware of anything that depends on StartupCache being a
zip file, and since I want to use lz4 compression because inflate
is showing up quite a lot in profiles, it's simplest to just use
a custom format. This loosely mimicks the ScriptPreloader code,
with a few diversions:

- Obviously the contents of the cache are compressed. I used lz4
  for this as I hit the same file size as deflate at a compression
  level of 1, which is what the StartupCache was using previously,
  while decompressing an order of magnitude faster. Seemed like
  the most conservative change to make. I think it's worth
  investigating what the impact of slower algs with higher ratios
  would be, but for right now I settled on this. We'd probably
  want to look at zstd next.
- I use streaming compression for this via lz4frame. This is not
  strictly necessary, but has the benefit of not requiring as
  much memory for large buffers, as well as giving us a built-in
  checksum, rather than relying on the much slower CRC that we
  were doing with the zip-based approach.
- I coded the serialization of the headers inline, since I had to
  jump back to add the offset and compressed size, which would
  make the nice Code(...) method for the ScriptPreloader stuff
  rather more complex. Open to cleaner solutions, but moving it
  out just felt like extra hoops for the reader to jump through
  to understand without the benefit of being more concise.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 22:15:35 +00:00
Doug Thayer d27f7199e1 Bug 1550108 - Add mapErr method to Result r=froydnj
Adds an explicit error mapping function to Result, to simplify
using MOZ_TRY... macros.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 22:15:35 +00:00
Doug Thayer fdbddfa996 Bug 1550108 - Pull in secondary lz4 libraries r=glandium
I opted to go with what I perceived as the more expedient route
of leaving lz4 roughly where it is and just adding to that. The
biggest complication was xxhash, which is included elsewhere.
I'm not generally proficient with build-related things though so
my solution may be wrong and not just ugly.

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

--HG--
rename : mfbt/lz4.c => mfbt/lz4/lz4.c
rename : mfbt/lz4.h => mfbt/lz4/lz4.h
extra : moz-landing-system : lando
2019-09-27 22:15:01 +00:00
Henri Sivonen 07723965c2 Bug 1578339 addendum - Avoid function calls in ASCIIness and Latin1ness checking and conversion between Latin1 and UTF-16 for short strings. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D47072

--HG--
extra : moz-landing-system : lando
2019-09-26 12:46:16 +00:00
Henri Sivonen 4cc848414e Bug 1578339 - Use SIMD accelerated encoding conversions in SpiderMonkey. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D44470

--HG--
extra : moz-landing-system : lando
2019-09-26 12:45:00 +00:00
kriswright ddd0133b2a Bug 1572238 - Dump assertion stacks using __android_log_print. r=Ehsan
Defines an android-only version of nsTraceRefcnt::WalkTheStack that takes a function callback, which outputs the stack frame buffer to `__android_log_print`. Also uses `__wrap_dladdr` in MozDescribeCodeAddress, which outputs slightly more informative data for the stack trace (instead of instances of '???/??? [???]').

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

--HG--
extra : moz-landing-system : lando
2019-09-24 20:50:41 +00:00
Bogdan Tara e4913f5aeb Backed out changeset 88334e3a605e (bug 1572238) for causing windows 2012 bustages CLOSED TREE 2019-09-24 21:57:56 +03:00
kriswright 9ac396cf78 Bug 1572238 - Dump assertion stacks using __android_log_print. r=Ehsan
Defines an android-only version of nsTraceRefcnt::WalkTheStack that takes a function callback, which outputs the stack frame buffer to `__android_log_print`. Also uses `__wrap_dladdr` in MozDescribeCodeAddress, which outputs slightly more informative data for the stack trace (instead of instances of '???/??? [???]').

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

--HG--
extra : moz-landing-system : lando
2019-09-24 12:14:24 +00:00
Boris Zbarsky fa0ce4b209 Bug 1581315 part 1. Adjust MOZ_MUST_RETURN_FROM_CALLER to only apply to method calls on arguments. r=nika
It doesn't really make sense to enforce this behavior for calls on stack
variables (which presumably we then want to do something with) and doesn't
necessarily make sense to enforce it for member variables either.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 02:17:01 +00:00
Emilio Cobos Álvarez 5c4d9db375 Bug 1582358 - Fix move semantics for Result where the error is non-copiable. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D46428

--HG--
extra : moz-landing-system : lando
2019-09-20 01:18:40 +00:00
Henri Sivonen 200b29fbf4 Bug 1579813 - Wrap new encoding_rs::mem functions in MFBT. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D45171

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:45 +00:00
Henri Sivonen c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Liang-Heng Chen 0e69ec9edd Bug 1581511 - fix move constructor of ScopeExit; r=froydnj
add `MOZ_GUARD_OBJECT_NOTIFIER_{PARAM,INIT}` to move constructor.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 13:45:28 +00:00
Honza Bambas 1c65af06ec Bug 1580921 - Do more thread-safety checks in mozilla::WeakPtr, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45872

--HG--
extra : moz-landing-system : lando
2019-09-13 17:23:16 +00:00
Honza Bambas 431cc4a42d Bug 1580182 - Allow mozilla::SupportsWeakPtr be on base classes as well, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45515

--HG--
extra : moz-landing-system : lando
2019-09-11 19:44:17 +00:00
Nathan Froyd 15178cebef Bug 1580458 - remove wchar.h include from TypeTraits.h; r=dmajor
The only plausible reason I can think of to include this header here is
for `wchar_t`, but `wchar_t` is a builtin type.  So let's get rid of the
header.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 12:46:09 +00:00
Tom Ritter d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Eric Rahm dfb17c1ba8 Bug 1578107 - Remove using namespace std from mfbt r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D44320

--HG--
extra : moz-landing-system : lando
2019-09-02 16:45:26 +00:00
Henri Sivonen 95fecf7af4 Bug 1577700 - Add a function for obtaining a Span of char from a Span of uint8_t. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D44124

--HG--
extra : moz-landing-system : lando
2019-08-30 13:16:19 +00:00
Jeff Walden aeb4f741d0 Bug 1577051 - Fix an implicit-conversion-changes-value warning with new-enough clang by explicitly converting. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D43701

--HG--
extra : moz-landing-system : lando
2019-08-28 16:35:22 +00:00
Nathan Froyd 71c23d8716 Bug 1576056 - delete all the standard library-related checks in Compiler.h; r=dmajor
We don't support stlport anymore, we don't use any of these macros, and
even if we did, there are probably better ways to do what we want than
by depending on the subtleties of how C++ standard libraries version
themselves.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 22:42:17 +00:00
Ryan VanderMeulen 9098d47fe0 Backed out changeset cfb420e8ae50 (bug 1575293) for regressions rendering Graphite fonts which use lz4 internally. CLOSED TREE
MANUAL PUSH: Because the hook says I need to for this backout.

--HG--
extra : rebase_source : dd86738d1fbc711e87354e27a89f91f5c6070a34
extra : amend_source : 59ae6c7936c9b7e0ecef72ed962f5ed41efe0b5a
2019-08-21 16:41:02 -04:00
Ryan VanderMeulen 503640ffaf Bug 1575293 - Update lz4 to version 1.9.2. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42682

--HG--
extra : moz-landing-system : lando
2019-08-21 14:53:22 +00:00
Coroiu Cristina f8a92d587b Backed out changeset d738b8cf1664 (bug 1575293) for reftest failures at text-decoration/skip-ink-multiline-position.html on a CLOSED TREE 2019-08-21 17:41:36 +03:00
Ryan VanderMeulen 9f2b512316 Bug 1575293 - Update lz4 to version 1.9.2. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42682

--HG--
extra : moz-landing-system : lando
2019-08-21 12:43:18 +00:00
Brian Hackett 091f2992d2 Bug 1573938 - Never collect wrapper JSObjects when recording/replaying, r=mccr8.
Differential Revision: https://phabricator.services.mozilla.com/D42011

--HG--
extra : moz-landing-system : lando
2019-08-16 20:51:12 +00:00
Emilio Cobos Álvarez c3ee3ac3a8 Bug 1418624 - Allow mozilla::Result to be moved, make unwrap{,Err}() move, and add inspect() APIs that return references. r=froydnj
Also adjust some of the callers that were either calling unwrap() repeatedly on
the same result, or were doing silly copies, to use inspect().

We could try to use stuff like:

https://clang.llvm.org/docs/AttributeReference.html#consumed-annotation-checking

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

--HG--
extra : moz-landing-system : lando
2019-08-13 08:26:18 +00:00
Sylvestre Ledru 645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Nika Layzell 96a0de728a Bug 1570725 - Show type of assertion in crashreporter MozCrashReason, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D40240

--HG--
extra : moz-landing-system : lando
2019-08-06 20:33:34 +00:00
Aaron Klotz a2b73b8abc Bug 1570395: Add StaticLocalAutoPtr and StaticLocalRefPtr to XPCOM; r=froydnj
This patch adds smart pointers to be used for initializing objects as C++11
"magic statics" -- that is, they are able to take advantage of C++11's
guarantee of thread safety during initialization by atomically constructing
both the smart pointer itself as well as the object being pointed to.

Unlike Static{Auto,Ref}Ptr, they have non-trivial constructors, though they
must still have trivial destructors to prevent emission of atexit calls.

The new classes use the new `MOZ_STATIC_LOCAL_CLASS` annotation which ensures
their instantiations are static locals and prevents non-trivial destructors.

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

--HG--
rename : xpcom/base/StaticPtr.h => xpcom/base/StaticLocalPtr.h
extra : moz-landing-system : lando
2019-08-02 17:26:37 +00:00
Aaron Klotz db8a55f024 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-30 18:51:11 +00:00
Mihai Alexandru Michis fbddadbfab Backed out 3 changesets (bug 1569681) for causing build bustages. CLOSED TREE
Backed out changeset 292cc6853e82 (bug 1569681)
Backed out changeset 4d0a7b968eb0 (bug 1569681)
Backed out changeset be9e5f8f00d0 (bug 1569681)
2019-07-29 23:21:01 +03:00
Aaron Klotz dd7121c289 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 20:10:39 +00:00
Mihai Alexandru Michis ab5f499ef3 Backed out 3 changesets (bug 1569681) for causing build bustages. CLOSED TREE
Backed out changeset 075b818a46fe (bug 1569681)
Backed out changeset 2c543b239808 (bug 1569681)
Backed out changeset 21ea6fea046e (bug 1569681)
2019-07-29 22:53:13 +03:00
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