gecko-dev/tools/fuzzing/ipc
Ray Kraesig 54ac39289a Bug 1772908 - [1/6] Drive-by cleanup: simplify use of SyncRunnable r=xpcom-reviewers,necko-reviewers,nika,valentin
`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
2022-11-04 21:04:18 +00:00
..
IPCFuzzController.cpp Bug 1772908 - [1/6] Drive-by cleanup: simplify use of SyncRunnable r=xpcom-reviewers,necko-reviewers,nika,valentin 2022-11-04 21:04:18 +00:00
IPCFuzzController.h Bug 1782507 - Pin IPC fuzzing to new actor / last port after constructor. r=truber 2022-08-05 17:23:00 +00:00
ProtocolFuzzer.cpp
ProtocolFuzzer.h Bug 1779829: Replace `Shmem::PrivateIPDLCaller` with `friend` specifiers. r=nika 2022-07-27 19:13:02 +00:00
moz.build Bug 1756778 - Integrate top-level IPC fuzzing. r=nika 2022-05-05 15:39:24 +00:00