Closed Bug 1512298 Opened 2 years ago Closed 2 years ago
Make IPC Moz
47 bytes, text/x-phabricator-request
|Details | Review|
IPDL async message generates non-exclusive MozPromise. The prevents the use of move semantics, and often leads to poor coding practice as people keep replicating the code in multiple places.
Summary: Don't make IPC MozPromise non-exclusive → Make IPC MozPromise exclusive
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics. While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback. As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/4e7923ac0159 Make IPDL MozPromise exclusive. r=gerald,froydnj
You need to log in before you can comment on or make changes to this bug.