summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB/Key.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /dom/indexedDB/Key.h
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/indexedDB/Key.h')
-rw-r--r--dom/indexedDB/Key.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/dom/indexedDB/Key.h b/dom/indexedDB/Key.h
index d19bc94e53..25ddd3e0b1 100644
--- a/dom/indexedDB/Key.h
+++ b/dom/indexedDB/Key.h
@@ -25,6 +25,7 @@ class Key {
friend struct IPC::ParamTraits<Key>;
nsCString mBuffer;
+ CopyableTArray<uint32_t> mAutoIncrementKeyOffsets;
public:
enum {
@@ -86,7 +87,10 @@ class Key {
return Compare(mBuffer, aOther.mBuffer) >= 0;
}
- void Unset() { mBuffer.SetIsVoid(true); }
+ void Unset() {
+ mBuffer.SetIsVoid(true);
+ mAutoIncrementKeyOffsets.Clear();
+ }
bool IsUnset() const { return mBuffer.IsVoid(); }
@@ -174,6 +178,10 @@ class Key {
return 0;
}
+ void ReserveAutoIncrementKey(bool aFirstOfArray);
+
+ void MaybeUpdateAutoIncrementKey(int64_t aKey);
+
private:
class MOZ_STACK_CLASS ArrayValueEncoder;
@@ -273,6 +281,8 @@ class Key {
template <typename T>
nsresult SetFromSource(T* aSource, uint32_t aIndex);
+
+ void WriteDoubleToUint64(char* aBuffer, double aValue);
};
} // namespace mozilla::dom::indexedDB