summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB/Key.h
diff options
context:
space:
mode:
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