summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB/Key.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /dom/indexedDB/Key.h
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.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