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
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
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
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
IsBaseOf<A, A> holds despite the fact that a class is not actually a
base class of itself.
Differential Revision: https://phabricator.services.mozilla.com/D6694
--HG--
extra : moz-landing-system : lando
I'd like to add a constructor and operator= to RefPtr for mscom::AgileReference.
This patch is simply the forward declarations to allow for that.
Differential Revision: https://phabricator.services.mozilla.com/D5317
--HG--
extra : moz-landing-system : lando
I'd like to add a constructor and operator= to RefPtr for mscom::AgileReference.
This patch is simply the forward declarations to allow for that.
Differential Revision: https://phabricator.services.mozilla.com/D5317
--HG--
extra : source : 2787fb454f40584ad146c61fd9b375c419efe803
I'd like to add a constructor and operator= to RefPtr for mscom::AgileReference.
This patch is simply the forward declarations to allow for that.
Differential Revision: https://phabricator.services.mozilla.com/D5317
--HG--
extra : moz-landing-system : lando
I'd like to add a constructor and operator= to RefPtr for mscom::AgileReference.
This patch is simply the forward declarations to allow for that.
Differential Revision: https://phabricator.services.mozilla.com/D5317
--HG--
extra : moz-landing-system : lando
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
As per bug 1487622, annotations have side effects on codegen, one of
which changes a leak signature that the wpt harness doesn't match
against its whitelist anymore.
Interestingly, while looking at the issue, I found multiple moz_*
annotations that weren't actually looked for by the clang plugin,
making them useless. Even more interestingly, removing them changes
codegen in such a way that the leak signature mentioned above is not
altered anymore.
Differential Revision: https://phabricator.services.mozilla.com/D5000
It's currently fairly difficult to perform some operation on each member of a
tuple. This is a particular issue in the context of adding a cycle collection
helper, where we need to perform traverse and unlink operations on each member
of a tuple, and don't have a way to do so without several layers of templates.
This patch adds a ForEach function which will call a function on each element
of the tuple. This would typically be used with a lambda function with a
single `auto&` argument.
--HG--
extra : rebase_source : 577f7c823ab7ee8d1fdedfbd26393c1f1664b965
Currently lookupOrAdd() will allocate if the table has no storage. But it
doesn't report an error if the allocation fails, which can cause problems.
This patch changes things so that lookupOrAdd() doesn't allocate when the table
has no storage. Instead, it returns an AddPtr that is not *valid* (its mTable
is empty) but it is *live*, and can be used in add(), whereupon the allocation
will occur.
The patch also makes Ptr::isValid() and AddPtr::isValid() non-public, because
the valid vs. live distinction is non-obvious and best kept hidden within the
classes.
--HG--
extra : rebase_source : 95d58725d92cc83332e27a61f98fa61185440e26