The functionality is unnecessary duplication of what the Device Manager already
does, and nsITokenDialogs.ChooseToken() exists as a dedicated UI for choosing
tokens anyways.
Since we're already breaking addon compat, the changes here also update
nsITokenPasswordDialogs.setPassword() to not unnecessarily return the `canceled`
value through an outparam.
MozReview-Commit-ID: C2KVXzrpDR3
--HG--
extra : rebase_source : e0e6eb89735125a9b85491356c9d367eab0c2a3b
MOZ_ASSERT_UNREACHABLE() is basically equivalent to NS_NOTREACHED().
PSM already uses MOZ_ASSERT_UNREACHABLE() for new code, so there's no need to use
NS_NOTREACHED() as well.
MozReview-Commit-ID: 9k2z9a1oIqe
--HG--
extra : rebase_source : 824595a1f7b7d3f86e2961d8bbffacf2a022c98e
MOZ_ASSERT() is basically equivalent to NS_ASSERTION().
PSM already uses MOZ_ASSERT() for new code, so there's no need to use
NS_ASSERTION() as well.
MozReview-Commit-ID: JHDsbDkYvHf
--HG--
extra : rebase_source : e9830af8d4355c2a2831a4565c3ba6024056f6d3
PR_ASSERT() is an unnecessary dependency on NSPR.
We can use MOZ_ASSERT() instead, which accomplishes the same task but doesn't
depend on NSPR.
MozReview-Commit-ID: 9gyWUkv3KxQ
--HG--
extra : rebase_source : 313ce6c8de3db3ce72635e37f09d28316ae02c51
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