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

397 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Chris Martin 6f57bf69b4 Bug 1402282 - Move CSPRNG logic to common area r=froydnj
The logic in JSMath for generating cryptographically-secure
pseudorandom numbers without NSS is independently useful, and so
it's been moved to a common area.

It will eventually be used for generated random arena ids.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 18:00:15 +00:00
Gerald Squelart 964e9708ac Bug 1054115 - Maybe::map and apply now take the function through a forwarding reference - r=froydnj
No need to specify the return type in C++14, this save some less-readable
decltype&declval work.

And we make sure to std::forward the function object before invoking it, to
preserve its const and l/rvalue qualifiers.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 17:20:02 +00:00
Noemi Erli 06a8cd8e3c Backed out changeset bee1c344cb47 (bug 1491909) for failures in browser/components/extensions/test/xpcshell/test_ext_geckoProfiler_control.js 2018-10-24 04:23:13 +03:00
Cosmin Sabou de8cde8599 Backed out changeset b283e9a224e0 (bug 1402282) build bustages on RandomNum.cpp. 2018-10-24 03:00:42 +03:00
Cosmin Sabou 035c4c098e Bug 1402282 - Move CSPRNG logic to common area r=froydnj
--HG--
extra : rebase_source : a273743c193ebfb054105949068578a4a57cf3a0
2018-10-24 02:49:33 +03:00
Denis Palmeiro fc930ad16f Bug 1491909 - Add an AllocPolicy to mozilla::JSONWriter r=jwalden,mstange
JSONWriter currently calls new and delete indirectly through mozilla::MakeUnique to allocate a buffer.  Becuase of this, the methods of this class cannot be invoked within Spidermonkey due to https://searchfox.org/mozilla-central/source/config/check_vanilla_allocations.py#6-14.  Therefore, JSONWriter needs an AllocPolicy template parameter so that the allocation and deallocation routines can be changed to match the JS AllocPolicy when invoked within SpiderMonkey.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:31 +00:00
Botond Ballo 63264c57f4 Bug 1498767 - Add missing MFBT tests to testing/cppunittest.py. r=froydnj
Also add a comment to mfbt/tests/moz.build to remind people that tests
need to be added to testing/cppunittest.py.

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

--HG--
extra : moz-landing-system : lando
2018-10-13 21:54:27 +00:00
Emilio Cobos Álvarez c9c6290890 Bug 1489453 - EnumSet shouldn't take 32 bits if not needed. r=froydnj
This is the only reason I haven't used it before for things like
StyleSheet::State.

Change the underlying type to be the underlying enum representation by default,
but allow to override it if wanted.

Assertions should catch misuses.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:40:02 +00:00
Nathan Froyd 1e249c5e16 Bug 1486882 - make TestPoisonArea work with aarch64 windows; r=Waldo
We already have the AArch64 return instruction; we just need to check
for the Windows-specific preprocessor conditional.
2018-08-29 14:47:49 -04:00
Gerald Squelart 2d21b03a3b Bug 1482046 - mfbt: FunctionTypeTraits - r=froydnj
FunctionTypeTraits< function type > makes it easier to inspect a function's
return type, arity, and parameter types.
It works with free functions, struct/class methods, function objects like
non-generic lambdas and std::function.

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

--HG--
extra : moz-landing-system : lando
2018-08-15 10:27:45 +00:00
Andreas Farre b5730bd2b0 Bug 1445659 - Make it possible to store RefPtr<T> in AutoCleanLinkedList. r=froydnj
Add a trait method that AutoCleanLinkedList delegates to for calling
delete on non-refcounted list elements.

--HG--
extra : histedit_source : 5e8b05f348d734d9045621d858caed946853fc02
2018-06-13 06:25:00 +03:00
Brian Hackett be2b98186b Bug 1207696 Part 2b - Don't record activity in atomics unit tests, r=waldo.
--HG--
extra : rebase_source : 8fb15b2d0d73adf63ed3251f55c0cbbbcf0c9c18
2018-07-21 14:20:13 +00:00
Brian Hackett f6b8e6f81c Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
--HG--
extra : rebase_source : f4e2d9f8831cf41c19d592ce252e87161f32250b
2018-07-20 23:58:34 +00:00
Jeff Walden d243be25b1 Bug 1426909 - Abstract out mozilla::DecodeOneUtf8CodePoint for decoding a UTF-8 code point after having consumed a non-ASCII lead unit, with configurable error notification through optional user-provided functors. r=froydnj
--HG--
extra : rebase_source : 25836018b00b545a60969abccf40ce313d4da1af
2018-07-12 17:41:31 -07:00
Jeff Walden 90507ffb7a Bug 1426909 - Introduce a new mfbt/Utf8.h header for UTF-8-related functionality, including a UTF-8 code unit type that is compatible with, but doesn't directly interconvert with, |char|. r=froydnj
--HG--
extra : rebase_source : 00760186060d7e72fac783af3fc5595a6057feca
2018-01-11 11:29:53 -07:00
Andi-Bogdan Postelnicu 4a5d0dd615 Bug 1453795 - MFTB - Initialize member fields in classes/ structures. r=waldo
--HG--
extra : rebase_source : e091acb3a9f60695b87ab9e3d348c5978680d2f8
2018-06-15 13:49:31 +03:00
Alessio Placitelli 1ecfce2746 Bug 1467759 - Escape all the property names in JSONWriter. r=froydnj
Scalar property names (e.g. IntProperty) are already escaped correctly.
This patch escapes the collection property names (e.g. StartObjectProperty)
as well (and adds test coverage for it).

MozReview-Commit-ID: 68kkjPb2ZN7

--HG--
extra : rebase_source : b42939ccebb71fc73914ff595803b2d6c7df2715
2018-06-08 19:50:25 +02:00
Jeff Walden c55625cdec Bug 1467336 - Implement mozilla::IsAscii to detect pure ASCII characters. r=froydnj
--HG--
extra : rebase_source : 1f6de2745234766d676178bdeafb9b82e48e51b5
2018-06-07 02:17:10 -07:00
Jeff Walden 701bad47cd Bug 1438212 - Implement mozilla::IsFloat32Representable using an algorithm that handles NaN correctly and doesn't sometimes invoke undefined behavior. r=froydnj
--HG--
extra : rebase_source : b4246ea818046b1e4100b90a3a371a866ea2b098
2018-06-06 16:03:47 -07:00
André Bargull f7acf7bc9c Bug 1466909 - Use AddLvalueReference for UniquePtr's operator*(). r=froydnj
--HG--
extra : rebase_source : df072aca7e79ce534c3bc620a352adfc92fbf245
2018-06-07 07:27:22 -07:00