mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
a7666fd8fe
Currently if you write an async IPDL method which has a return value, we expose a SendXXX method which returns a MozPromise. This MozPromise can then be ->Then-ed to run code when it is resolved or rejected. Unfortunately, using this API loses ordering guarantees which IPDL provides. MozPromise::Then takes an event target, which the resolve runnable is dispatched to. This means that the resolve callback's code doesn't have any ordering guarantees relative to the processing of other IPC messages coming over the same protocol. This adds a new overload to SendXXX with two additional arguments, a lambda callback which is called if the call succeeds, and a lambda callback which is called if the call fails. These will be called in order with other IPC messages sent over the same protocol. MozReview-Commit-ID: FZHJJaSDoZy |
||
---|---|---|
.. | ||
components | ||
content | ||
crashreporter | ||
forgetaboutsite | ||
library | ||
locales | ||
modules | ||
mozapps | ||
pluginproblem | ||
profile | ||
system | ||
themes | ||
xre | ||
.eslintrc.js | ||
moz.build | ||
moz.configure | ||
nss.configure | ||
toolkit.mozbuild |