| Index: third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
|
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
|
| index c31e35bd04e63e622bb7b35ef5a9f304b161af38..dfb16760dca7bfd6ccce762bdd36042cc3aa7740 100644
|
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
|
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
|
| @@ -307,7 +307,6 @@ IDBTransaction* IDBDatabase::transaction(ScriptState* scriptState, const StringO
|
| return nullptr;
|
| }
|
|
|
| -
|
| if (scope.isEmpty()) {
|
| exceptionState.throwDOMException(InvalidAccessError, "The storeNames parameter was empty.");
|
| return nullptr;
|
| @@ -332,7 +331,7 @@ IDBTransaction* IDBDatabase::transaction(ScriptState* scriptState, const StringO
|
| int64_t transactionId = nextTransactionId();
|
| m_backend->createTransaction(transactionId, WebIDBDatabaseCallbacksImpl::create(m_databaseCallbacks).release(), objectStoreIds, mode);
|
|
|
| - return IDBTransaction::create(scriptState, transactionId, scope, mode, this);
|
| + return IDBTransaction::createNonVersionChange(scriptState, transactionId, scope, mode, this);
|
| }
|
|
|
| void IDBDatabase::forceClose()
|
| @@ -435,10 +434,13 @@ int64_t IDBDatabase::findObjectStoreId(const String& name) const
|
| return IDBObjectStoreMetadata::InvalidId;
|
| }
|
|
|
| -void IDBDatabase::objectStoreRenamed(int64_t storeId, const String& newName)
|
| +void IDBDatabase::objectStoreRenamed(int64_t objectStoreId, const String& newName)
|
| {
|
| - DCHECK(m_metadata.objectStores.contains(storeId));
|
| - IDBDatabaseMetadata::ObjectStoreMap::iterator it = m_metadata.objectStores.find(storeId);
|
| + DCHECK(m_versionChangeTransaction) << "Object store renamed on database without a versionchange transaction";
|
| + DCHECK(m_versionChangeTransaction->isActive()) << "Object store renamed when versionchange transaction is not active";
|
| + DCHECK(m_backend) << "Object store renamed after database connection closed";
|
| + DCHECK(m_metadata.objectStores.contains(objectStoreId));
|
| + IDBDatabaseMetadata::ObjectStoreMap::iterator it = m_metadata.objectStores.find(objectStoreId);
|
| it->value.name = newName;
|
| }
|
|
|
|
|