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
Because they each only have a single call site, and the "too many items
removed?" test is already encapsulated within rehashIfOverloaded().
--HG--
extra : rebase_source : f6550c483477c2839764e7f657b542c24c82b1e8
infallibleRehashIfOverloaded() actually matches what it does.
Also, the patch removes the `overloaded()` test within the function, because
`rehashIfOverloaded()` has the same test.
--HG--
extra : rebase_source : 2799e623fbdd4b8bb82f8b83166752e02a0f9202
Specifically:
- checkOverloaded -> rehashIfOverloaded
- checkUnderloaded -> shrinkIfUnderloaded
- checkOverRemoved -> rehashIfOverRemoved
Because I've always found that the `check` prefix doesn't clearly explain that
the table might be changed,
And:
- shouldCompressTable -> overRemoved
Because that matches `overloaded` and `underloaded`.
--HG--
extra : rebase_source : 56e9edd012f4a400ac366895d05ea93fb09ec6b3
Because that's a more accurate description of what it does -- it finds free
*and* removed entries.
--HG--
extra : rebase_source : 72b049f44c61a7406d9691a9d9b6405dd696848c
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