Also remove the #includes of some unused header files.
MozReview-Commit-ID: 6mRoIazEA3j
--HG--
extra : rebase_source : 6f96d22543509bf09b684b0bfbfa624eafc58b94
Instead of lvalues, MozPromiseHolder::Resolve and Reject now take either
const& or && values of the expected types, to allow move semantics all the way
to the ResolveOrRejectValue object.
Note that we won't just take forwarding references of any type, as this could
lead to implicit conversions by bypassing the 'explicit' marker of the value
type constructors, like in bug 1331137.
MozReview-Commit-ID: K0jeY6WTXI1
--HG--
extra : rebase_source : 7ee0fd1edfdeadb239f48c8b5b46fd54af3ec5d2
MozPromise::All sets up 'Then' lambdas on all sub-promises, each one taking the
resolve/reject object by value.
Since this value will not be used again in the lambda, it is safe to Move it,
and from there MozPromiseHolder::Resolve/Reject can also Move it again into the
holder storage, potentially saving two copies per Resolve/Reject.
Also, once all sub-promises have been resolved, the resolve-values can be
Move'd into the joining promise's Resolve function.
MozReview-Commit-ID: 5oxgNEnE5lq
--HG--
extra : rebase_source : f0542055beb1434e7db384722c5123d888ca00e7
The aArgs parameter pack was already Forward'ed inside the constructor, so
maybe the '&&' was forgotten?
MozReview-Commit-ID: 7yg07axhZnp
--HG--
extra : rebase_source : dccd3ea5f0f1b6cadfe6bbc86c8ad34cb7f2c99e
Bug 1295053 removed most uses of NS_METHOD and NS_CALLBACK, but one use was
unintentionally left behind (in the XPIDL parser) and another has since crept
in (in MediaDrmCDMProxy.h).
So this patch removes NS_METHOD and NS_CALLBACK. NS_METHOD_(nsresult) and
NS_CALLBACK_(nsresult, T) can still be used for the same purpose, but those
alternatives are less likely to be used unintentionally.
--HG--
extra : rebase_source : a50fc7b2a64a36d1ca9beda81bc0edb8f2ec1934
Then and ThenPromise can now be given only one member function, which takes a
`const MozPromise::ResolveOrRejectValue&`.
MozReview-Commit-ID: 5Zm0i27GHcA
--HG--
extra : rebase_source : 1ed068681616fa0aa5fa77f8dbf78ccbd727f363
Then and ThenPromise can now be given only one function object, which takes a
`const MozPromise::ResolveOrRejectValue&`.
MozReview-Commit-ID: BEtc3spK9Yh
--HG--
extra : rebase_source : 1b16ad15ebfcdfb653d8d98073adee0f8b27b46e
Removed 'virtual' from overrides, as per coding guidelines.
Fixed some incorrect indentations, and inconsistencies.
MozReview-Commit-ID: 4kNVgoDljG3
--HG--
extra : rebase_source : 7b25abacc7cfc1a6898963bc58120204c70bee45
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.
This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.
MozReview-Commit-ID: 3vwhS55Yzt
--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
The point of this exercise is to make the thread name available in the thread
func of the thread, so that we can register the thread with the profiler from
the very start of its lifetime, and so that registration and unregistration
can be inside the same function.
MozReview-Commit-ID: DiiMKUQVr55
--HG--
extra : rebase_source : 24b15d56315ad49e72b3e9b76db7fb634f3bfe01