IDBError MemoryIDBBackingStore::createObjectStore(const IDBResourceIdentifier& transactionIdentifier, const IDBObjectStoreInfo& info) { LOG(IndexedDB, "MemoryIDBBackingStore::createObjectStore - adding OS %s with ID %" PRIu64, info.name().utf8().data(), info.identifier()); ASSERT(m_databaseInfo); if (m_databaseInfo->hasObjectStore(info.name())) return { IDBDatabaseException::ConstraintError }; ASSERT(!m_objectStoresByIdentifier.contains(info.identifier())); auto objectStore = MemoryObjectStore::create(info); m_databaseInfo->addExistingObjectStore(info); auto rawTransaction = m_transactions.get(transactionIdentifier); ASSERT(rawTransaction); ASSERT(rawTransaction->isVersionChange()); rawTransaction->addNewObjectStore(objectStore.get()); registerObjectStore(WTFMove(objectStore)); return { }; }
void MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort(Ref<MemoryObjectStore>&& objectStore) { registerObjectStore(WTFMove(objectStore)); }
void MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort(std::unique_ptr<MemoryObjectStore>&& objectStore) { registerObjectStore(WTF::move(objectStore)); }