From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- modules/libpref/Preferences.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/libpref/Preferences.h') diff --git a/modules/libpref/Preferences.h b/modules/libpref/Preferences.h index 81c99590da..c675195d57 100644 --- a/modules/libpref/Preferences.h +++ b/modules/libpref/Preferences.h @@ -15,6 +15,7 @@ #include "mozilla/Atomics.h" #include "mozilla/MemoryReporting.h" +#include "mozilla/MozPromise.h" #include "mozilla/StaticPtr.h" #include "nsCOMPtr.h" #include "nsIObserver.h" @@ -97,6 +98,8 @@ class Preferences final : public nsIPrefService, friend class ::nsPrefBranch; public: + using WritePrefFilePromise = MozPromise; + NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIPREFSERVICE NS_FORWARD_NSIPREFBRANCH(mRootBranch->) @@ -454,7 +457,9 @@ class Preferences final : public nsIPrefService, // Off main thread is only respected for the default aFile value (nullptr). nsresult SavePrefFileInternal(nsIFile* aFile, SaveMethod aSaveMethod); - nsresult WritePrefFile(nsIFile* aFile, SaveMethod aSaveMethod); + nsresult WritePrefFile( + nsIFile* aFile, SaveMethod aSaveMethod, + UniquePtr> aPromise = nullptr); nsresult ResetUserPrefs(); -- cgit v1.2.3