Changeset 117512 in webkit
- Timestamp:
- May 17, 2012 4:20:26 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117509 r117512 1 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Remove IDBIndex.storeName 4 https://bugs.webkit.org/show_bug.cgi?id=86676 5 6 Reviewed by Tony Chang. 7 8 Older versions of the IDB spec exposed IDBIndex.storeName. While it's been removed 9 from the IDL, the additional storage/plumbing are unnecessary clutter. Nuke it! 10 11 No new tests - no functional changes. 12 13 * Modules/indexeddb/IDBIndexBackendImpl.cpp: 14 (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): Remove storeName parameter, and 15 const declaration on object store param. The former was used to get a non-const pointer 16 via indirection in openCursorInternal. 17 (WebCore::IDBIndexBackendImpl::openCursorInternal): Use store pointer directly, don't 18 look it up by name in the transaction. 19 * Modules/indexeddb/IDBIndexBackendImpl.h: 20 (WebCore::IDBIndexBackendImpl::create): Remove storeName parameters. 21 (IDBIndexBackendImpl): Remove storeName() method. 22 * Modules/indexeddb/IDBIndexBackendInterface.h: 23 (IDBIndexBackendInterface): Remove storeName parameter. 24 * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: 25 (WebCore::IDBObjectStoreBackendImpl::createIndex): Remove storeName parameter. 26 (WebCore::IDBObjectStoreBackendImpl::loadIndexes): Remove storeName parameter. 27 1 28 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 29 -
trunk/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.cpp
r117334 r117512 42 42 namespace WebCore { 43 43 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)44 IDBIndexBackendImpl::IDBIndexBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, IDBObjectStoreBackendImpl* objectStoreBackend, int64_t id, const String& name, const String& keyPath, bool unique, bool multiEntry) 45 45 : m_backingStore(backingStore) 46 46 , m_databaseId(databaseId) … … 48 48 , m_id(id) 49 49 , m_name(name) 50 , m_storeName(storeName)51 50 , m_keyPath(keyPath) 52 51 , m_unique(unique) … … 55 54 } 56 55 57 IDBIndexBackendImpl::IDBIndexBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, const IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry)56 IDBIndexBackendImpl::IDBIndexBackendImpl(IDBBackingStore* backingStore, int64_t databaseId, IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& keyPath, bool unique, bool multiEntry) 58 57 : m_backingStore(backingStore) 59 58 , m_databaseId(databaseId) … … 61 60 , m_id(InvalidId) 62 61 , m_name(name) 63 , m_storeName(storeName)64 62 , m_keyPath(keyPath) 65 63 , m_unique(unique) … … 97 95 } 98 96 99 ExceptionCode ec = 0; 100 RefPtr<IDBObjectStoreBackendInterface> objectStore = transaction->objectStore(index->m_storeName, ec); 101 ASSERT(objectStore && !ec); 102 103 RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(backingStoreCursor.get(), direction, cursorType, transaction.get(), objectStore.get()); 97 RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(backingStoreCursor.get(), direction, cursorType, transaction.get(), index->m_objectStoreBackend); 104 98 callbacks->onSuccess(cursor.release()); 105 99 } -
trunk/Source/WebCore/Modules/indexeddb/IDBIndexBackendImpl.h
r117334 r117512 41 41 class IDBIndexBackendImpl : public IDBIndexBackendInterface { 42 42 public: 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)43 static PassRefPtr<IDBIndexBackendImpl> create(IDBBackingStore* backingStore, int64_t databaseId, IDBObjectStoreBackendImpl* objectStoreBackend, int64_t id, const String& name, const String& keyPath, bool unique, bool multiEntry) 44 44 { 45 return adoptRef(new IDBIndexBackendImpl(backingStore, databaseId, objectStoreBackend, id, name, storeName,keyPath, unique, multiEntry));45 return adoptRef(new IDBIndexBackendImpl(backingStore, databaseId, objectStoreBackend, id, name, keyPath, unique, multiEntry)); 46 46 } 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)47 static PassRefPtr<IDBIndexBackendImpl> create(IDBBackingStore* backingStore, int64_t databaseId, IDBObjectStoreBackendImpl* objectStoreBackend, const String& name, const String& keyPath, bool unique, bool multiEntry) 48 48 { 49 return adoptRef(new IDBIndexBackendImpl(backingStore, databaseId, objectStoreBackend, name, storeName,keyPath, unique, multiEntry));49 return adoptRef(new IDBIndexBackendImpl(backingStore, databaseId, objectStoreBackend, name, keyPath, unique, multiEntry)); 50 50 } 51 51 virtual ~IDBIndexBackendImpl(); … … 63 63 // Implements IDBIndexBackendInterface. 64 64 virtual String name() { return m_name; } 65 virtual String storeName() { return m_storeName; }66 65 virtual String keyPath() { return m_keyPath; } 67 66 virtual bool unique() { return m_unique; } … … 77 76 78 77 private: 79 IDBIndexBackendImpl(IDBBackingStore*, int64_t databaseId, const IDBObjectStoreBackendImpl*, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry);80 IDBIndexBackendImpl(IDBBackingStore*, int64_t databaseId, const IDBObjectStoreBackendImpl*, const String& name, const String& storeName, const String& keyPath, bool unique, bool multiEntry);78 IDBIndexBackendImpl(IDBBackingStore*, int64_t databaseId, IDBObjectStoreBackendImpl*, int64_t id, const String& name, const String& keyPath, bool unique, bool multiEntry); 79 IDBIndexBackendImpl(IDBBackingStore*, int64_t databaseId, IDBObjectStoreBackendImpl*, const String& name, const String& keyPath, bool unique, bool multiEntry); 81 80 82 81 static void openCursorInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKeyRange>, unsigned short direction, IDBCursorBackendInterface::CursorType, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBTransactionBackendInterface>); … … 95 94 96 95 int64_t m_databaseId; 97 constIDBObjectStoreBackendImpl* m_objectStoreBackend;96 IDBObjectStoreBackendImpl* m_objectStoreBackend; 98 97 int64_t m_id; 99 98 String m_name; 100 String m_storeName;101 99 String m_keyPath; 102 100 bool m_unique; -
trunk/Source/WebCore/Modules/indexeddb/IDBIndexBackendInterface.h
r114981 r117512 47 47 48 48 virtual String name() = 0; 49 virtual String storeName() = 0;50 49 virtual String keyPath() = 0; 51 50 virtual bool unique() = 0; -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp
r117338 r117512 519 519 } 520 520 521 RefPtr<IDBIndexBackendImpl> index = IDBIndexBackendImpl::create(backingStore().get(), databaseId(), this, name, m_name,keyPath, unique, multiEntry);521 RefPtr<IDBIndexBackendImpl> index = IDBIndexBackendImpl::create(backingStore().get(), databaseId(), this, name, keyPath, unique, multiEntry); 522 522 ASSERT(index->name() == name); 523 523 … … 666 666 667 667 for (size_t i = 0; i < ids.size(); i++) 668 m_indexes.set(names[i], IDBIndexBackendImpl::create(backingStore().get(), databaseId(), this, ids[i], names[i], m_name,keyPaths[i], uniqueFlags[i], multiEntryFlags[i]));668 m_indexes.set(names[i], IDBIndexBackendImpl::create(backingStore().get(), databaseId(), this, ids[i], names[i], keyPaths[i], uniqueFlags[i], multiEntryFlags[i])); 669 669 } 670 670 -
trunk/Source/WebKit/chromium/ChangeLog
r117509 r117512 1 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Remove IDBIndex.storeName 4 https://bugs.webkit.org/show_bug.cgi?id=86676 5 6 Reviewed by Tony Chang. 7 8 * public/WebIDBIndex.h: 9 (WebIDBIndex): Can't remove from here until Chromium is updated 10 * src/IDBIndexBackendProxy.cpp: Removed storeName() 11 * src/IDBIndexBackendProxy.h: Removed storeName() 12 (IDBIndexBackendProxy): 13 * src/WebIDBIndexImpl.cpp: Removed storeName() 14 * src/WebIDBIndexImpl.h: Removed storeName() 15 (WebIDBIndexImpl): 16 1 17 2012-05-17 Joshua Bell <jsbell@chromium.org> 2 18 -
trunk/Source/WebKit/chromium/public/WebIDBIndex.h
r115339 r117512 48 48 return WebString(); 49 49 } 50 // FIXME: Remove method once callers are updated. 50 51 virtual WebString storeName() const 51 52 { -
trunk/Source/WebKit/chromium/src/IDBIndexBackendProxy.cpp
r115339 r117512 61 61 } 62 62 63 String IDBIndexBackendProxy::storeName()64 {65 return m_webIDBIndex->storeName();66 }67 68 63 String IDBIndexBackendProxy::keyPath() 69 64 { -
trunk/Source/WebKit/chromium/src/IDBIndexBackendProxy.h
r114981 r117512 43 43 44 44 virtual String name(); 45 virtual String storeName();46 45 virtual String keyPath(); 47 46 virtual bool unique(); -
trunk/Source/WebKit/chromium/src/WebIDBIndexImpl.cpp
r115339 r117512 54 54 } 55 55 56 WebString WebIDBIndexImpl::storeName() const57 {58 return m_backend->storeName();59 }60 61 56 WebIDBKeyPath WebIDBIndexImpl::keyPath() const 62 57 { -
trunk/Source/WebKit/chromium/src/WebIDBIndexImpl.h
r115339 r117512 45 45 46 46 virtual WebString name() const; 47 virtual WebString storeName() const;48 47 virtual WebIDBKeyPath keyPath() const; 49 48 // FIXME: Remove this method once callers are updated.
Note: See TracChangeset
for help on using the changeset viewer.