summaryrefslogtreecommitdiffstats
path: root/WebCore/storage/IDBKey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/storage/IDBKey.cpp')
-rw-r--r--WebCore/storage/IDBKey.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/WebCore/storage/IDBKey.cpp b/WebCore/storage/IDBKey.cpp
index 8ec5dfd..50c4c46 100644
--- a/WebCore/storage/IDBKey.cpp
+++ b/WebCore/storage/IDBKey.cpp
@@ -53,6 +53,25 @@ IDBKey::~IDBKey()
{
}
+bool IDBKey::isEqual(IDBKey* other)
+{
+ if (!other || other->m_type != m_type)
+ return false;
+
+ switch (m_type) {
+ case StringType:
+ return other->m_string == m_string;
+ // FIXME: Implement dates.
+ case NumberType:
+ return other->m_number == m_number;
+ case NullType:
+ return true;
+ }
+
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
} // namespace WebCore
#endif