зеркало из https://github.com/mozilla/gecko-dev.git
54ac39289a
`SyncRunnable`'s helper functions take an `nsIRunnable *`; but the most common way of building nsIRunnables, `NS_NewRunnableFunction`, returns an `already_AddRefed<nsIRunnable>` instead. Add two new overloads of the helper functions to eliminate the impedance mismatch. (This does result in an uncomfortable amount of code duplication. While we could eliminate that with appropriate use of SFINAE, it'll be simpler if we wait for C++20 and its `requires` keyword.) Additionally, add two explicitly-deleted overloads to catch and prevent a previously-common antipattern that presumably resulted from this type mismatch: accidentally wrapping the actual runnable in two layers of `SyncRunnable`. Fix the former use-sites appropriately. (This was probably harmless, but is also probably best avoided.) No functional changes. This is in some sense a continuation of bug 1281626. (This is no longer actually relevant to bug 1772908 due to a different approach being taken. It remains in the patchset anyway, for simplicity's sake.) Differential Revision: https://phabricator.services.mozilla.com/D157131 |
||
---|---|---|
.. | ||
bloatview | ||
browsertime | ||
clang-tidy | ||
code-coverage | ||
compare-locales | ||
crashreporter | ||
esmify | ||
fuzzing | ||
github-sync | ||
jprof | ||
leak-gauge | ||
lint | ||
moztreedocs | ||
performance | ||
phabricator | ||
power | ||
profiler | ||
quitter | ||
rb | ||
rewriting | ||
rusttests | ||
sanitizer/docs | ||
tryselect | ||
update-packaging | ||
update-programs | ||
update-verify | ||
vcs | ||
mach_commands.py | ||
moz.build |