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:
Andreas Farre 2020-07-31 13:37:20 +00:00
Родитель b13577d8e4
Коммит 5ae385d240
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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); \