Chromium Code Reviews| Index: third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
| index aa6524d1ebddae195ea237a791b8b3d7d2c62beb..c3ea8d4d7d32592d72c942cd6a95a97e5d7005ea 100644 |
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
| @@ -191,6 +191,19 @@ void IDBTransaction::objectStoreDeleted(const String& name) |
| } |
| } |
| +void IDBTransaction::objectStoreWillBeRenamed(const String& oldName, const String& newName) |
|
jsbell
2016/09/07 17:16:14
Here we don't need the id... but it still seems li
pwnall
2016/09/07 22:43:52
objectStoreDeleted() also takes in the store's nam
|
| +{ |
| + DCHECK(m_state != Finished); |
| + DCHECK(isVersionChange()); |
| + |
| + DCHECK(!m_objectStoreMap.contains(newName)); |
| + DCHECK(m_objectStoreMap.contains(oldName)) << "The object store had to be accessed in order to be renamed."; |
| + |
| + IDBObjectStoreMap::iterator it = m_objectStoreMap.find(oldName); |
| + m_objectStoreMap.set(newName, it->value); |
| + m_objectStoreMap.remove(oldName); |
| +} |
| + |
| void IDBTransaction::setActive(bool active) |
| { |
| DCHECK_NE(m_state, Finished) << "A finished transaction tried to setActive(" << (active ? "true" : "false") << ")"; |