зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613431 - Part 4: Require that synced field setters' return value is handled. r=nika
Depends on D83647 Differential Revision: https://phabricator.services.mozilla.com/D83648
This commit is contained in:
Родитель
b13577d8e4
Коммит
5ae385d240
|
@ -57,7 +57,7 @@ class Transaction {
|
|||
// If the target has been discarded, changes will be ignored.
|
||||
//
|
||||
// NOTE: This method mutates `this`, clearing the modified field set.
|
||||
nsresult Commit(Context* aOwner);
|
||||
MOZ_MUST_USE nsresult Commit(Context* aOwner);
|
||||
|
||||
// Called from `ContentParent` in response to a transaction from content.
|
||||
mozilla::ipc::IPCResult CommitFromIPC(const MaybeDiscarded<Context>& aOwner,
|
||||
|
@ -198,7 +198,7 @@ class FieldStorage {
|
|||
const type& Get##name() const { return mFields.template Get<IDX_##name>(); } \
|
||||
\
|
||||
template <typename U> \
|
||||
nsresult Set##name(U&& aValue) { \
|
||||
MOZ_MUST_USE nsresult Set##name(U&& aValue) { \
|
||||
Transaction txn; \
|
||||
txn.template Set<IDX_##name>(std::forward<U>(aValue)); \
|
||||
return txn.Commit(this); \
|
||||
|
|
Загрузка…
Ссылка в новой задаче