Index: content/common/indexed_db/indexed_db_key.cc |
diff --git a/content/common/indexed_db/indexed_db_key.cc b/content/common/indexed_db/indexed_db_key.cc |
index 02610bfe2413adc5563ed1e9610c7d4d41e6c05e..3c511402ddeacef01079fa47faadea7f64b78ced 100644 |
--- a/content/common/indexed_db/indexed_db_key.cc |
+++ b/content/common/indexed_db/indexed_db_key.cc |
@@ -50,6 +50,29 @@ IndexedDBKey::IndexedDBKey() |
number_(0), |
size_estimate_(kOverheadSize) {} |
+IndexedDBKey::IndexedDBKey(const IndexedDBKey& other) |
+ : type_(other.type_), |
+ array_(other.array_), |
+ binary_(other.binary_), |
+ string_(other.string_), |
+ date_(other.date_), |
+ number_(other.number_), |
+ size_estimate_(other.size_estimate_) { |
+ DCHECK((!IsValid() && !other.IsValid()) || Compare(other) == 0); |
+} |
+ |
+IndexedDBKey& IndexedDBKey::operator=(const IndexedDBKey& other) { |
+ type_ = other.type_; |
+ array_ = other.array_; |
+ binary_ = other.binary_; |
+ string_ = other.string_; |
+ date_ = other.date_; |
+ number_ = other.number_; |
+ size_estimate_ = other.size_estimate_; |
+ DCHECK((!IsValid() && !other.IsValid()) || Compare(other) == 0); |
+ return *this; |
+} |
+ |
IndexedDBKey::IndexedDBKey(WebIDBKeyType type) |
: type_(type), date_(0), number_(0), size_estimate_(kOverheadSize) { |
DCHECK(type == WebIDBKeyTypeNull || type == WebIDBKeyTypeInvalid); |