Bug 1264642 - Part 1. Remove unused methods from IDBObjectStore::StructuredCloneWriteInfo. r=baku draft
authorKan-Ru Chen <kanru@kanru.info>
Fri, 22 Apr 2016 15:30:41 +0800
changeset 403871 5ebe37f7f7b564d84cf8fae87a012fa53c740114
parent 403581 f97a056ae6235de7855fd8aaa04fb1c8d183bd06
child 403872 d24e0497407e48b031a7a7f1cb2861ae927342ff
push id27038
push userbmo:kchen@mozilla.com
push dateMon, 22 Aug 2016 11:42:11 +0000
reviewersbaku
bugs1264642
milestone51.0a1
Bug 1264642 - Part 1. Remove unused methods from IDBObjectStore::StructuredCloneWriteInfo. r=baku MozReview-Commit-ID: 8MIFD0MizOo
dom/indexedDB/IDBObjectStore.cpp
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -102,46 +102,16 @@ struct IDBObjectStore::StructuredCloneWr
     mBlobOrMutableFiles.SwapElements(aCloneWriteInfo.mBlobOrMutableFiles);
     aCloneWriteInfo.mOffsetToKeyProp = 0;
   }
 
   ~StructuredCloneWriteInfo()
   {
     MOZ_COUNT_DTOR(StructuredCloneWriteInfo);
   }
-
-  bool
-  operator==(const StructuredCloneWriteInfo& aOther) const
-  {
-    return this->mCloneBuffer.nbytes() == aOther.mCloneBuffer.nbytes() &&
-           this->mCloneBuffer.data() == aOther.mCloneBuffer.data() &&
-           this->mBlobOrMutableFiles == aOther.mBlobOrMutableFiles &&
-           this->mDatabase == aOther.mDatabase &&
-           this->mOffsetToKeyProp == aOther.mOffsetToKeyProp;
-  }
-
-  bool
-  SetFromSerialized(const SerializedStructuredCloneWriteInfo& aOther)
-  {
-    if (aOther.data().IsEmpty()) {
-      mCloneBuffer.clear();
-    } else {
-      auto* aOtherBuffer =
-        reinterpret_cast<uint64_t*>(
-          const_cast<uint8_t*>(aOther.data().Elements()));
-      if (!mCloneBuffer.copy(aOtherBuffer, aOther.data().Length())) {
-        return false;
-      }
-    }
-
-    mBlobOrMutableFiles.Clear();
-
-    mOffsetToKeyProp = aOther.offsetToKeyProp();
-    return true;
-  }
 };
 
 namespace {
 
 struct MOZ_STACK_CLASS MutableFileData final
 {
   nsString type;
   nsString name;