summaryrefslogtreecommitdiffstats
path: root/toolkit/components/kvstore/nsIKeyValue.idl
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/kvstore/nsIKeyValue.idl')
-rw-r--r--toolkit/components/kvstore/nsIKeyValue.idl16
1 files changed, 14 insertions, 2 deletions
diff --git a/toolkit/components/kvstore/nsIKeyValue.idl b/toolkit/components/kvstore/nsIKeyValue.idl
index b90d45fc5a..08cd548af2 100644
--- a/toolkit/components/kvstore/nsIKeyValue.idl
+++ b/toolkit/components/kvstore/nsIKeyValue.idl
@@ -22,7 +22,7 @@ interface nsIKeyValuePair;
* for all use cases. Extension of this API to support transactions is tracked
* by bug 1499238.
*
- * The kvstore.jsm module wraps this API in a more idiomatic, Promise-based
+ * The kvstore.sys.mjs module wraps this API in a more idiomatic, Promise-based
* JS API that supports async/await. In most cases, you're better off using
* that API from JS rather than using this one directly. Bug 1512319 tracks
* native support for Promise in Rust-implemented XPCOM methods.
@@ -33,6 +33,12 @@ interface nsIKeyValuePair;
*/
[scriptable, builtinclass, rust_sync, uuid(46c893dd-4c14-4de0-b33d-a1be18c6d062)]
interface nsIKeyValueService : nsISupports {
+ cenum RecoveryStrategy: 8 {
+ ERROR,
+ DISCARD,
+ RENAME,
+ };
+
/**
* Get a handle to an existing database or a newly-created one
* at the specified path and with the given name.
@@ -46,6 +52,12 @@ interface nsIKeyValueService : nsISupports {
in nsIKeyValueDatabaseCallback callback,
in AUTF8String path,
in AUTF8String name);
+
+ void getOrCreateWithOptions(
+ in nsIKeyValueDatabaseCallback callback,
+ in AUTF8String path,
+ in AUTF8String name,
+ [optional] in nsIKeyValueService_RecoveryStrategy recoveryStrategy);
};
/**
@@ -157,7 +169,7 @@ interface nsIKeyValuePair : nsISupports {
* an nsIKeyValuePair rather than an nsISupports, so consumers don't need
* to QI it to that interface; but this interface doesn't implement the JS
* iteration protocol (because the Rust-XPCOM bindings don't yet support it),
- * which is another reason why you should use the kvstore.jsm module from JS
+ * which is another reason why you should use the kvstore.sys.mjs module from JS
* instead of accessing this API directly.
*/
[scriptable, builtinclass, rust_sync, uuid(b9ba7116-b7ff-4717-9a28-a08e6879b199)]