Changeset 113622 in webkit
- Timestamp:
- Apr 9, 2012 2:37:08 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r113618 r113622 1 2012-04-09 Joshua Bell <jsbell@chromium.org> 2 3 Unreviewed, rolling out r113473. 4 http://trac.webkit.org/changeset/113473 5 https://bugs.webkit.org/show_bug.cgi?id=83074 6 7 Change does not handle cursor retention of LevelDB iterators 8 9 * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: 10 (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl): 11 (WebCore::IDBDatabaseBackendImpl::createObjectStore): 12 (WebCore::IDBDatabaseBackendImpl::loadObjectStores): 13 * Modules/indexeddb/IDBIndexBackendImpl.cpp: 14 (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): 15 (WebCore::IDBIndexBackendImpl::openCursorInternal): 16 (WebCore::IDBIndexBackendImpl::countInternal): 17 (WebCore::IDBIndexBackendImpl::getInternal): 18 (WebCore::IDBIndexBackendImpl::addingKeyAllowed): 19 * Modules/indexeddb/IDBIndexBackendImpl.h: 20 (WebCore::IDBIndexBackendImpl::create): 21 (IDBIndexBackendImpl): 22 * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: 23 (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): 24 (WebCore::IDBObjectStoreBackendImpl::getInternal): 25 (WebCore::IDBObjectStoreBackendImpl::putInternal): 26 (WebCore::IDBObjectStoreBackendImpl::deleteInternal): 27 (WebCore::IDBObjectStoreBackendImpl::clearInternal): 28 (WebCore): 29 (WebCore::IDBObjectStoreBackendImpl::createIndex): 30 (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): 31 (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): 32 (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): 33 (WebCore::IDBObjectStoreBackendImpl::countInternal): 34 (WebCore::IDBObjectStoreBackendImpl::loadIndexes): 35 (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): 36 * Modules/indexeddb/IDBObjectStoreBackendImpl.h: 37 (WebCore): 38 (WebCore::IDBObjectStoreBackendImpl::create): 39 (WebCore::IDBObjectStoreBackendImpl::databaseId): 40 (IDBObjectStoreBackendImpl): 41 1 42 2012-04-06 James Robinson <jamesr@chromium.org> 2 43 -
trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
r113473 r113622 121 121 IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl() 122 122 { 123 // This check should only be false in tests. 124 if (m_factory) 125 m_factory->removeIDBDatabaseBackend(m_identifier); 123 m_factory->removeIDBDatabaseBackend(m_identifier); 126 124 } 127 125 … … 149 147 } 150 148 151 RefPtr<IDBObjectStoreBackendImpl> objectStore = IDBObjectStoreBackendImpl::create( this, name, keyPath, autoIncrement);149 RefPtr<IDBObjectStoreBackendImpl> objectStore = IDBObjectStoreBackendImpl::create(m_backingStore.get(), m_id, name, keyPath, autoIncrement); 152 150 ASSERT(objectStore->name() == name); 153 151 … … 388 386 389 387 for (size_t i = 0; i < ids.size(); i++) 390 m_objectStores.set(names[i], IDBObjectStoreBackendImpl::create( this, ids[i], names[i], keyPaths[i], autoIncrementFlags[i]));388 m_objectStores.set(names[i], IDBObjectStoreBackendImpl::create(m_backingStore.get(), m_id, ids[i], names[i], keyPaths[i], autoIncrementFlags[i])); 391 389 } 392 390 -
trunk/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
r113473 r113622 42 42 namespace WebCore { 43 43 44 IDBIndexBackendImpl::IDBIndexBackendImpl(const IDBDatabaseBackendImpl* database, const IDBObjectStoreBackendImpl* objectStoreBackend, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry) 45 : m_database(database) 44 IDBIndexBackendImpl::IDBIndexBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, const IDBObjectStoreBackendImpl* objectStoreBackend, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry) 45 : m_backingStore(backingStore) 46 , m_databaseId(databaseId) 46 47 , m_objectStoreBackend(objectStoreBackend) 47 48 , m_id(id) … … 54 55 } 55 56 56 IDBIndexBackendImpl::IDBIndexBackendImpl(const IDBDatabaseBackendImpl* database, const IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry) 57 : m_database(database) 57 IDBIndexBackendImpl::IDBIndexBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, const IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry) 58 : m_backingStore(backingStore) 59 , m_databaseId(databaseId) 58 60 , m_objectStoreBackend(objectStoreBackend) 59 61 , m_id(InvalidId) … … 79 81 switch (cursorType) { 80 82 case IDBCursorBackendInterface::IndexKeyCursor: 81 backingStoreCursor = index-> backingStore()->openIndexKeyCursor(index->databaseId(), index->m_objectStoreBackend->id(), index->id(), range.get(), direction);83 backingStoreCursor = index->m_backingStore->openIndexKeyCursor(index->m_databaseId, index->m_objectStoreBackend->id(), index->id(), range.get(), direction); 82 84 break; 83 85 case IDBCursorBackendInterface::IndexCursor: 84 backingStoreCursor = index-> backingStore()->openIndexCursor(index->databaseId(), index->m_objectStoreBackend->id(), index->id(), range.get(), direction);86 backingStoreCursor = index->m_backingStore->openIndexCursor(index->m_databaseId, index->m_objectStoreBackend->id(), index->id(), range.get(), direction); 85 87 break; 86 88 case IDBCursorBackendInterface::ObjectStoreCursor: … … 130 132 uint32_t count = 0; 131 133 132 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = index-> backingStore()->openIndexKeyCursor(index->databaseId(), index->m_objectStoreBackend->id(), index->id(), range.get(), IDBCursor::NEXT);134 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = index->m_backingStore->openIndexKeyCursor(index->m_databaseId, index->m_objectStoreBackend->id(), index->id(), range.get(), IDBCursor::NEXT); 133 135 if (!backingStoreCursor) { 134 136 callbacks->onSuccess(SerializedScriptValue::numberValue(count)); … … 155 157 // FIXME: Split getInternal into two functions, getting rid off |getObject|. 156 158 if (getObject) { 157 String value = index-> backingStore()->getObjectViaIndex(index->databaseId(), index->m_objectStoreBackend->id(), index->id(), *key);159 String value = index->m_backingStore->getObjectViaIndex(index->m_databaseId, index->m_objectStoreBackend->id(), index->id(), *key); 158 160 if (value.isNull()) { 159 161 callbacks->onSuccess(SerializedScriptValue::undefinedValue()); … … 162 164 callbacks->onSuccess(SerializedScriptValue::createFromWire(value)); 163 165 } else { 164 RefPtr<IDBKey> keyResult = index-> backingStore()->getPrimaryKeyViaIndex(index->databaseId(), index->m_objectStoreBackend->id(), index->id(), *key);166 RefPtr<IDBKey> keyResult = index->m_backingStore->getPrimaryKeyViaIndex(index->m_databaseId, index->m_objectStoreBackend->id(), index->id(), *key); 165 167 if (!keyResult) { 166 168 callbacks->onSuccess(static_cast<IDBKey*>(0)); … … 197 199 198 200 RefPtr<IDBKey> foundPrimaryKey; 199 bool found = backingStore()->keyExistsInIndex(databaseId(), m_objectStoreBackend->id(), m_id, *indexKey, foundPrimaryKey);201 bool found = m_backingStore->keyExistsInIndex(m_databaseId, m_objectStoreBackend->id(), m_id, *indexKey, foundPrimaryKey); 200 202 if (!found) 201 203 return true; -
trunk/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.h
r113473 r113622 30 30 31 31 #include "IDBCursorBackendInterface.h" 32 #include "IDBDatabaseBackendImpl.h"33 32 #include "IDBIndexBackendInterface.h" 34 33 … … 42 41 class IDBIndexBackendImpl : public IDBIndexBackendInterface { 43 42 public: 44 static PassRefPtr<IDBIndexBackendImpl> create( const IDBDatabaseBackendImpl* database, const IDBObjectStoreBackendImpl* objectStoreBackend, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry)43 static PassRefPtr<IDBIndexBackendImpl> create(IDBBackingStore* backingStore, int64_t databaseId, const IDBObjectStoreBackendImpl* objectStoreBackend, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry) 45 44 { 46 return adoptRef(new IDBIndexBackendImpl( database, objectStoreBackend, id, name, storeName, keyPath, unique, multiEntry));45 return adoptRef(new IDBIndexBackendImpl(backingStore, databaseId, objectStoreBackend, id, name, storeName, keyPath, unique, multiEntry)); 47 46 } 48 static PassRefPtr<IDBIndexBackendImpl> create( const IDBDatabaseBackendImpl* database, const IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry)47 static PassRefPtr<IDBIndexBackendImpl> create(IDBBackingStore* backingStore, int64_t databaseId, const IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry) 49 48 { 50 return adoptRef(new IDBIndexBackendImpl( database, objectStoreBackend, name, storeName, keyPath, unique, multiEntry));49 return adoptRef(new IDBIndexBackendImpl(backingStore, databaseId, objectStoreBackend, name, storeName, keyPath, unique, multiEntry)); 51 50 } 52 51 virtual ~IDBIndexBackendImpl(); … … 76 75 77 76 private: 78 IDBIndexBackendImpl( const IDBDatabaseBackendImpl*, const IDBObjectStoreBackendImpl*, int64_t, const String&, const String&, const String&, bool, bool);79 IDBIndexBackendImpl( const IDBDatabaseBackendImpl*, const IDBObjectStoreBackendImpl*, const String&, const String&, const String&, bool, bool);77 IDBIndexBackendImpl(IDBBackingStore*, int64_t databaseId, const IDBObjectStoreBackendImpl*, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry); 78 IDBIndexBackendImpl(IDBBackingStore*, int64_t databaseId, const IDBObjectStoreBackendImpl*, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry); 80 79 81 80 static void openCursorInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKeyRange>, unsigned short direction, IDBCursorBackendInterface::CursorType, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBTransactionBackendInterface>); … … 85 84 static const int64_t InvalidId = 0; 86 85 87 PassRefPtr<IDBBackingStore> backingStore() const { return m_database->backingStore(); } 88 int64_t databaseId() const { return m_database->id(); } 86 RefPtr<IDBBackingStore> m_backingStore; 89 87 90 const IDBDatabaseBackendImpl* m_database; 91 88 int64_t m_databaseId; 92 89 const IDBObjectStoreBackendImpl* m_objectStoreBackend; 93 90 int64_t m_id; -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
r113473 r113622 52 52 } 53 53 54 IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(const IDBDatabaseBackendImpl* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement) 55 : m_database(database) 54 IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, int64_t id, const String& name, const String& keyPath, bool autoIncrement) 55 : m_backingStore(backingStore) 56 , m_databaseId(databaseId) 56 57 , m_id(id) 57 58 , m_name(name) … … 63 64 } 64 65 65 IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(const IDBDatabaseBackendImpl* database, const String& name, const String& keyPath, bool autoIncrement) 66 : m_database(database) 66 IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, const String& name, const String& keyPath, bool autoIncrement) 67 : m_backingStore(backingStore) 68 , m_databaseId(databaseId) 67 69 , m_id(InvalidId) 68 70 , m_name(name) … … 95 97 { 96 98 IDB_TRACE("IDBObjectStoreBackendImpl::getInternal"); 97 String wireData = objectStore-> backingStore()->getObjectStoreRecord(objectStore->databaseId(), objectStore->id(), *key);99 String wireData = objectStore->m_backingStore->getObjectStoreRecord(objectStore->m_databaseId, objectStore->id(), *key); 98 100 if (wireData.isNull()) { 99 101 callbacks->onSuccess(SerializedScriptValue::undefinedValue()); … … 244 246 ASSERT(key && key->valid()); 245 247 246 RefPtr<IDBBackingStore::ObjectStoreRecordIdentifier> recordIdentifier = objectStore-> backingStore()->createInvalidRecordIdentifier();247 if (putMode == AddOnly && objectStore-> backingStore()->keyExistsInObjectStore(objectStore->databaseId(), objectStore->id(), *key, recordIdentifier.get())) {248 RefPtr<IDBBackingStore::ObjectStoreRecordIdentifier> recordIdentifier = objectStore->m_backingStore->createInvalidRecordIdentifier(); 249 if (putMode == AddOnly && objectStore->m_backingStore->keyExistsInObjectStore(objectStore->m_databaseId, objectStore->id(), *key, recordIdentifier.get())) { 248 250 objectStore->resetAutoIncrementKeyCache(); 249 251 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::CONSTRAINT_ERR, "Key already exists in the object store.")); … … 283 285 // Before this point, don't do any mutation. After this point, rollback the transaction in case of error. 284 286 285 if (!objectStore-> backingStore()->putObjectStoreRecord(objectStore->databaseId(), objectStore->id(), *key, value->toWireString(), recordIdentifier.get())) {287 if (!objectStore->m_backingStore->putObjectStoreRecord(objectStore->m_databaseId, objectStore->id(), *key, value->toWireString(), recordIdentifier.get())) { 286 288 // FIXME: The Indexed Database specification does not have an error code dedicated to I/O errors. 287 289 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Error writing data to stable storage.")); … … 296 298 continue; // The index object has been created, but does not exist in the database yet. 297 299 298 if (!objectStore-> backingStore()->deleteIndexDataForRecord(objectStore->databaseId(), objectStore->id(), index->id(), recordIdentifier.get())) {300 if (!objectStore->m_backingStore->deleteIndexDataForRecord(objectStore->m_databaseId, objectStore->id(), index->id(), recordIdentifier.get())) { 299 301 // FIXME: The Indexed Database specification does not have an error code dedicated to I/O errors. 300 302 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Error writing data to stable storage.")); … … 308 310 309 311 if (!index->multiEntry() || indexKey->type() != IDBKey::ArrayType) { 310 if (!objectStore-> backingStore()->putIndexDataForRecord(objectStore->databaseId(), objectStore->id(), index->id(), *indexKey, recordIdentifier.get())) {312 if (!objectStore->m_backingStore->putIndexDataForRecord(objectStore->m_databaseId, objectStore->id(), index->id(), *indexKey, recordIdentifier.get())) { 311 313 // FIXME: The Indexed Database specification does not have an error code dedicated to I/O errors. 312 314 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Error writing data to stable storage.")); … … 318 320 ASSERT(indexKey->type() == IDBKey::ArrayType); 319 321 for (size_t j = 0; j < indexKey->array().size(); ++j) { 320 if (!objectStore-> backingStore()->putIndexDataForRecord(objectStore->databaseId(), objectStore->id(), index->id(), *indexKey->array()[j], recordIdentifier.get())) {322 if (!objectStore->m_backingStore->putIndexDataForRecord(objectStore->m_databaseId, objectStore->id(), index->id(), *indexKey->array()[j], recordIdentifier.get())) { 321 323 // FIXME: The Indexed Database specification does not have an error code dedicated to I/O errors. 322 324 callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Error writing data to stable storage.")); … … 368 370 RefPtr<IDBBackingStore::ObjectStoreRecordIdentifier> recordIdentifier; 369 371 370 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore-> backingStore()->openObjectStoreCursor(objectStore->databaseId(), objectStore->id(), keyRange.get(), IDBCursor::NEXT);372 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore->m_backingStore->openObjectStoreCursor(objectStore->m_databaseId, objectStore->id(), keyRange.get(), IDBCursor::NEXT); 371 373 if (backingStoreCursor) { 372 374 … … 378 380 continue; // The index object has been created, but does not exist in the database yet. 379 381 380 bool success = objectStore-> backingStore()->deleteIndexDataForRecord(objectStore->databaseId(), objectStore->id(), it->second->id(), recordIdentifier.get());382 bool success = objectStore->m_backingStore->deleteIndexDataForRecord(objectStore->m_databaseId, objectStore->id(), it->second->id(), recordIdentifier.get()); 381 383 ASSERT_UNUSED(success, success); 382 384 } 383 385 384 objectStore-> backingStore()->deleteObjectStoreRecord(objectStore->databaseId(), objectStore->id(), recordIdentifier.get());386 objectStore->m_backingStore->deleteObjectStoreRecord(objectStore->m_databaseId, objectStore->id(), recordIdentifier.get()); 385 387 386 388 } while (backingStoreCursor->continueFunction(0)); … … 409 411 void IDBObjectStoreBackendImpl::clearInternal(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBCallbacks> callbacks) 410 412 { 411 objectStore-> backingStore()->clearObjectStore(objectStore->databaseId(), objectStore->id());413 objectStore->m_backingStore->clearObjectStore(objectStore->m_databaseId, objectStore->id()); 412 414 callbacks->onSuccess(SerializedScriptValue::undefinedValue()); 413 415 } … … 481 483 } 482 484 483 RefPtr<IDBIndexBackendImpl> index = IDBIndexBackendImpl::create(m_ database, this, name, m_name, keyPath, unique, multiEntry);485 RefPtr<IDBIndexBackendImpl> index = IDBIndexBackendImpl::create(m_backingStore.get(), m_databaseId, this, name, m_name, keyPath, unique, multiEntry); 484 486 ASSERT(index->name() == name); 485 487 … … 502 504 { 503 505 int64_t id; 504 if (!objectStore-> backingStore()->createIndex(objectStore->databaseId(), objectStore->id(), index->name(), index->keyPath(), index->unique(), index->multiEntry(), id)) {506 if (!objectStore->m_backingStore->createIndex(objectStore->m_databaseId, objectStore->id(), index->name(), index->keyPath(), index->unique(), index->multiEntry(), id)) { 505 507 transaction->abort(); 506 508 return; … … 509 511 index->setId(id); 510 512 511 if (!populateIndex(*objectStore-> backingStore(), objectStore->databaseId(), objectStore->m_id, index)) {513 if (!populateIndex(*objectStore->m_backingStore, objectStore->m_databaseId, objectStore->m_id, index)) { 512 514 transaction->abort(); 513 515 return; … … 555 557 void IDBObjectStoreBackendImpl::deleteIndexInternal(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBIndexBackendImpl> index, PassRefPtr<IDBTransactionBackendInterface> transaction) 556 558 { 557 objectStore-> backingStore()->deleteIndex(objectStore->databaseId(), objectStore->id(), index->id());559 objectStore->m_backingStore->deleteIndex(objectStore->m_databaseId, objectStore->id(), index->id()); 558 560 transaction->didCompleteTaskEvents(); 559 561 } … … 578 580 IDBCursor::Direction direction = static_cast<IDBCursor::Direction>(tmpDirection); 579 581 580 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore-> backingStore()->openObjectStoreCursor(objectStore->databaseId(), objectStore->id(), range.get(), direction);582 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore->m_backingStore->openObjectStoreCursor(objectStore->m_databaseId, objectStore->id(), range.get(), direction); 581 583 if (!backingStoreCursor) { 582 584 callbacks->onSuccess(SerializedScriptValue::nullValue()); … … 599 601 IDB_TRACE("IDBObjectStoreBackendImpl::countInternal"); 600 602 uint32_t count = 0; 601 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore-> backingStore()->openObjectStoreCursor(objectStore->databaseId(), objectStore->id(), range.get(), IDBCursor::NEXT);603 RefPtr<IDBBackingStore::Cursor> backingStoreCursor = objectStore->m_backingStore->openObjectStoreCursor(objectStore->m_databaseId, objectStore->id(), range.get(), IDBCursor::NEXT); 602 604 if (!backingStoreCursor) { 603 605 callbacks->onSuccess(SerializedScriptValue::numberValue(count)); … … 620 622 Vector<bool> uniqueFlags; 621 623 Vector<bool> multiEntryFlags; 622 backingStore()->getIndexes(databaseId(), m_id, ids, names, keyPaths, uniqueFlags, multiEntryFlags);624 m_backingStore->getIndexes(m_databaseId, m_id, ids, names, keyPaths, uniqueFlags, multiEntryFlags); 623 625 624 626 ASSERT(names.size() == ids.size()); … … 628 630 629 631 for (size_t i = 0; i < ids.size(); i++) 630 m_indexes.set(names[i], IDBIndexBackendImpl::create(m_ database, this, ids[i], names[i], m_name, keyPaths[i], uniqueFlags[i], multiEntryFlags[i]));632 m_indexes.set(names[i], IDBIndexBackendImpl::create(m_backingStore.get(), m_databaseId, this, ids[i], names[i], m_name, keyPaths[i], uniqueFlags[i], multiEntryFlags[i])); 631 633 } 632 634 … … 649 651 return IDBKey::createNumber(m_autoIncrementNumber++); 650 652 651 m_autoIncrementNumber = static_cast<int>( backingStore()->nextAutoIncrementNumber(databaseId(), id()));653 m_autoIncrementNumber = static_cast<int>(m_backingStore->nextAutoIncrementNumber(m_databaseId, id())); 652 654 return IDBKey::createNumber(m_autoIncrementNumber++); 653 655 } -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.h
r113473 r113622 27 27 #define IDBObjectStoreBackendImpl_h 28 28 29 #include "IDBDatabaseBackendImpl.h"30 29 #include "IDBObjectStoreBackendInterface.h" 31 30 #include <wtf/HashMap.h> … … 36 35 namespace WebCore { 37 36 37 class IDBBackingStore; 38 38 class IDBDatabaseBackendImpl; 39 39 class IDBIndexBackendImpl; … … 43 43 class IDBObjectStoreBackendImpl : public IDBObjectStoreBackendInterface { 44 44 public: 45 static PassRefPtr<IDBObjectStoreBackendImpl> create( const IDBDatabaseBackendImpl* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement)45 static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBBackingStore* backingStore, int64_t databaseId, int64_t id, const String& name, const String& keyPath, bool autoIncrement) 46 46 { 47 return adoptRef(new IDBObjectStoreBackendImpl( database, id, name, keyPath, autoIncrement));47 return adoptRef(new IDBObjectStoreBackendImpl(backingStore, databaseId, id, name, keyPath, autoIncrement)); 48 48 } 49 static PassRefPtr<IDBObjectStoreBackendImpl> create( const IDBDatabaseBackendImpl* database, const String& name, const String& keyPath, bool autoIncrement)49 static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBBackingStore* backingStore, int64_t databaseId, const String& name, const String& keyPath, bool autoIncrement) 50 50 { 51 return adoptRef(new IDBObjectStoreBackendImpl( database, name, keyPath, autoIncrement));51 return adoptRef(new IDBObjectStoreBackendImpl(backingStore, databaseId, name, keyPath, autoIncrement)); 52 52 } 53 53 virtual ~IDBObjectStoreBackendImpl(); … … 60 60 } 61 61 void setId(int64_t id) { m_id = id; } 62 int64_t databaseId() const { return m_databaseId; } 62 63 63 64 virtual String name() const { return m_name; } … … 82 83 83 84 private: 84 IDBObjectStoreBackendImpl( const IDBDatabaseBackendImpl*, int64_t, const String&, const String&, bool);85 IDBObjectStoreBackendImpl( const IDBDatabaseBackendImpl*, const String&, const String&, bool);85 IDBObjectStoreBackendImpl(IDBBackingStore*, int64_t databaseId, int64_t id, const String& name, const String& keyPath, bool autoIncrement); 86 IDBObjectStoreBackendImpl(IDBBackingStore*, int64_t databaseId, const String& name, const String& keyPath, bool autoIncrement); 86 87 87 88 void loadIndexes(); … … 103 104 static void revertAutoIncrementKeyCache(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl>); 104 105 105 PassRefPtr<IDBBackingStore> backingStore() const { return m_database->backingStore(); } 106 int64_t databaseId() const { return m_database->id(); } 106 RefPtr<IDBBackingStore> m_backingStore; 107 107 108 const IDBDatabaseBackendImpl* m_database;108 int64_t m_databaseId; 109 109 int64_t m_id; 110 110 String m_name; -
trunk/Source/WebKit/chromium/ChangeLog
r113618 r113622 1 2012-04-09 Joshua Bell <jsbell@chromium.org> 2 3 Unreviewed, rolling out r113473. 4 http://trac.webkit.org/changeset/113473 5 https://bugs.webkit.org/show_bug.cgi?id=83074 6 7 Change does not handle cursor retention of LevelDB iterators 8 9 * WebKit.gypi: 10 * tests/IDBDatabaseBackendTest.cpp: Removed. 11 1 12 2012-04-06 James Robinson <jamesr@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/WebKit.gypi
r113473 r113622 103 103 'tests/FrameTestHelpers.h', 104 104 'tests/IDBBindingUtilitiesTest.cpp', 105 'tests/IDBDatabaseBackendTest.cpp',106 105 'tests/IDBKeyPathTest.cpp', 107 106 'tests/IDBLevelDBCodingTest.cpp',
Note: See TracChangeset
for help on using the changeset viewer.