Remove some "modernFoo"s from IndexedDB code.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2016 23:28:33 +0000 (23:28 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2016 23:28:33 +0000 (23:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159985

Reviewed by Andy Estes.

No new tests (No known behavior change).

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::IDBCursor):
(WebCore::IDBCursor::~IDBCursor):
(WebCore::IDBCursor::sourcesDeleted):
(WebCore::IDBCursor::effectiveObjectStore):
(WebCore::IDBCursor::transaction):
(WebCore::IDBCursor::direction):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::IDBIndex):
(WebCore::IDBIndex::~IDBIndex):
(WebCore::IDBIndex::hasPendingActivity):
(WebCore::IDBIndex::name):
(WebCore::IDBIndex::objectStore):
(WebCore::IDBIndex::keyPath):
(WebCore::IDBIndex::unique):
(WebCore::IDBIndex::multiEntry):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::doGetKey):
(WebCore::IDBIndex::markAsDeleted):
* Modules/indexeddb/IDBIndex.h:

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::transaction):
(WebCore::IDBObjectStore::deleteFunction): Deleted.
(WebCore::IDBObjectStore::modernDelete): Deleted.
* Modules/indexeddb/IDBObjectStore.h:

* bindings/js/JSIDBIndexCustom.cpp:
(WebCore::JSIDBIndex::visitAdditionalChildren):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203480 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBIndex.cpp
Source/WebCore/Modules/indexeddb/IDBIndex.h
Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStore.h
Source/WebCore/bindings/js/JSIDBIndexCustom.cpp

index a27cdbf..01325f1 100644 (file)
@@ -1,3 +1,52 @@
+2016-07-20  Brady Eidson  <beidson@apple.com>
+
+        Remove some "modernFoo"s from IndexedDB code.
+        https://bugs.webkit.org/show_bug.cgi?id=159985
+
+        Reviewed by Andy Estes.
+
+        No new tests (No known behavior change).
+
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::IDBCursor):
+        (WebCore::IDBCursor::~IDBCursor):
+        (WebCore::IDBCursor::sourcesDeleted):
+        (WebCore::IDBCursor::effectiveObjectStore):
+        (WebCore::IDBCursor::transaction):
+        (WebCore::IDBCursor::direction):
+        (WebCore::IDBCursor::update):
+        (WebCore::IDBCursor::advance):
+        (WebCore::IDBCursor::continueFunction):
+        (WebCore::IDBCursor::uncheckedIterateCursor):
+        (WebCore::IDBCursor::deleteFunction):
+        (WebCore::IDBCursor::setGetResult):
+        
+        * Modules/indexeddb/IDBIndex.cpp:
+        (WebCore::IDBIndex::IDBIndex):
+        (WebCore::IDBIndex::~IDBIndex):
+        (WebCore::IDBIndex::hasPendingActivity):
+        (WebCore::IDBIndex::name):
+        (WebCore::IDBIndex::objectStore):
+        (WebCore::IDBIndex::keyPath):
+        (WebCore::IDBIndex::unique):
+        (WebCore::IDBIndex::multiEntry):
+        (WebCore::IDBIndex::openCursor):
+        (WebCore::IDBIndex::doCount):
+        (WebCore::IDBIndex::openKeyCursor):
+        (WebCore::IDBIndex::doGet):
+        (WebCore::IDBIndex::doGetKey):
+        (WebCore::IDBIndex::markAsDeleted):
+        * Modules/indexeddb/IDBIndex.h:
+        
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::transaction):
+        (WebCore::IDBObjectStore::deleteFunction): Deleted.
+        (WebCore::IDBObjectStore::modernDelete): Deleted.
+        * Modules/indexeddb/IDBObjectStore.h:
+        
+        * bindings/js/JSIDBIndexCustom.cpp:
+        (WebCore::JSIDBIndex::visitAdditionalChildren):
+
 2016-07-20  Chris Dumez  <cdumez@apple.com>
 
         Stop using valueToStringWithNullCheck() in JSCSSStyleDeclaration::putDelegate()
index e77f785..c3517d0 100644 (file)
@@ -117,7 +117,7 @@ IDBCursor::IDBCursor(IDBTransaction& transaction, IDBObjectStore& objectStore, c
     , m_info(info)
     , m_objectStore(&objectStore)
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     suspendIfNeeded();
 }
@@ -127,25 +127,25 @@ IDBCursor::IDBCursor(IDBTransaction& transaction, IDBIndex& index, const IDBCurs
     , m_info(info)
     , m_index(&index)
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     suspendIfNeeded();
 }
 
 IDBCursor::~IDBCursor()
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 }
 
 bool IDBCursor::sourcesDeleted() const
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     if (m_objectStore)
         return m_objectStore->isDeleted();
 
     ASSERT(m_index);
-    return m_index->isDeleted() || m_index->modernObjectStore().isDeleted();
+    return m_index->isDeleted() || m_index->objectStore().isDeleted();
 }
 
 IDBObjectStore& IDBCursor::effectiveObjectStore() const
@@ -154,25 +154,25 @@ IDBObjectStore& IDBCursor::effectiveObjectStore() const
         return *m_objectStore;
 
     ASSERT(m_index);
-    return m_index->modernObjectStore();
+    return m_index->objectStore();
 }
 
 IDBTransaction& IDBCursor::transaction() const
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
-    return effectiveObjectStore().modernTransaction();
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
+    return effectiveObjectStore().transaction();
 }
 
 const String& IDBCursor::direction() const
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
     return directionToString(m_info.cursorDirection());
 }
 
 RefPtr<WebCore::IDBRequest> IDBCursor::update(ExecState& exec, JSValue value, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBCursor::update");
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     if (sourcesDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -231,7 +231,7 @@ RefPtr<WebCore::IDBRequest> IDBCursor::update(ExecState& exec, JSValue value, Ex
 void IDBCursor::advance(unsigned count, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBCursor::advance");
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     if (!m_request) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -279,7 +279,7 @@ void IDBCursor::continueFunction(ExecState& execState, JSValue keyValue, Excepti
 void IDBCursor::continueFunction(const IDBKeyData& key, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBCursor::continueFunction (to key %s)", key.loggingString().utf8().data());
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     if (!m_request) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -329,7 +329,7 @@ void IDBCursor::continueFunction(const IDBKeyData& key, ExceptionCodeWithMessage
 
 void IDBCursor::uncheckedIterateCursor(const IDBKeyData& key, unsigned count)
 {
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     ++m_outstandingRequestCount;
 
@@ -340,7 +340,7 @@ void IDBCursor::uncheckedIterateCursor(const IDBKeyData& key, unsigned count)
 RefPtr<WebCore::IDBRequest> IDBCursor::deleteFunction(ExecState& execState, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBCursor::deleteFunction");
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     if (sourcesDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -372,7 +372,7 @@ RefPtr<WebCore::IDBRequest> IDBCursor::deleteFunction(ExecState& execState, Exce
         return nullptr;
     }
 
-    auto request = effectiveObjectStore().modernDelete(execState, m_currentPrimaryKey.get(), ec);
+    auto request = effectiveObjectStore().deleteFunction(execState, m_currentPrimaryKey.get(), ec);
     if (ec.code)
         return nullptr;
 
@@ -386,7 +386,7 @@ RefPtr<WebCore::IDBRequest> IDBCursor::deleteFunction(ExecState& execState, Exce
 void IDBCursor::setGetResult(IDBRequest& request, const IDBGetResult& getResult)
 {
     LOG(IndexedDB, "IDBCursor::setGetResult - current key %s", getResult.keyData().loggingString().substring(0, 100).utf8().data());
-    ASSERT(currentThread() == effectiveObjectStore().modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == effectiveObjectStore().transaction().database().originThreadID());
 
     auto* context = request.scriptExecutionContext();
     if (!context)
index 8af780e..40532e9 100644 (file)
@@ -47,14 +47,14 @@ IDBIndex::IDBIndex(ScriptExecutionContext& context, const IDBIndexInfo& info, ID
     , m_info(info)
     , m_objectStore(objectStore)
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     suspendIfNeeded();
 }
 
 IDBIndex::~IDBIndex()
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 }
 
 const char* IDBIndex::activeDOMObjectName() const
@@ -69,43 +69,43 @@ bool IDBIndex::canSuspendForDocumentSuspension() const
 
 bool IDBIndex::hasPendingActivity() const
 {
-    return !m_objectStore.modernTransaction().isFinished();
+    return !m_objectStore.transaction().isFinished();
 }
 
 const String& IDBIndex::name() const
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
     return m_info.name();
 }
 
-RefPtr<IDBObjectStore> IDBIndex::objectStore()
+IDBObjectStore& IDBIndex::objectStore()
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
-    return &m_objectStore;
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
+    return m_objectStore;
 }
 
 const IDBKeyPath& IDBIndex::keyPath() const
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
     return m_info.keyPath();
 }
 
 bool IDBIndex::unique() const
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
     return m_info.unique();
 }
 
 bool IDBIndex::multiEntry() const
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
     return m_info.multiEntry();
 }
 
 RefPtr<IDBRequest> IDBIndex::openCursor(ExecState& execState, IDBKeyRange* range, const String& directionString, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBIndex::openCursor");
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     if (m_deleted || m_objectStore.isDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -113,7 +113,7 @@ RefPtr<IDBRequest> IDBIndex::openCursor(ExecState& execState, IDBKeyRange* range
         return nullptr;
     }
 
-    if (!m_objectStore.modernTransaction().isActive()) {
+    if (!m_objectStore.transaction().isActive()) {
         ec.code = IDBDatabaseException::TransactionInactiveError;
         ec.message = ASCIILiteral("Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.");
         return nullptr;
@@ -131,14 +131,14 @@ RefPtr<IDBRequest> IDBIndex::openCursor(ExecState& execState, IDBKeyRange* range
     if (rangeData.upperKey.isNull())
         rangeData.upperKey = IDBKeyData::maximum();
 
-    auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), rangeData, direction, IndexedDB::CursorType::KeyAndValue);
-    return m_objectStore.modernTransaction().requestOpenCursor(execState, *this, info);
+    auto info = IDBCursorInfo::indexCursor(m_objectStore.transaction(), m_objectStore.info().identifier(), m_info.identifier(), rangeData, direction, IndexedDB::CursorType::KeyAndValue);
+    return m_objectStore.transaction().requestOpenCursor(execState, *this, info);
 }
 
 RefPtr<IDBRequest> IDBIndex::openCursor(ExecState& execState, JSValue key, const String& direction, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBIndex::openCursor");
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(execState, key, ec.code);
     if (ec.code) {
@@ -172,7 +172,7 @@ RefPtr<IDBRequest> IDBIndex::count(ExecState& execState, JSValue key, ExceptionC
 
 RefPtr<IDBRequest> IDBIndex::doCount(ExecState& execState, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     if (m_deleted || m_objectStore.isDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -185,7 +185,7 @@ RefPtr<IDBRequest> IDBIndex::doCount(ExecState& execState, const IDBKeyRangeData
         return nullptr;
     }
 
-    auto& transaction = m_objectStore.modernTransaction();
+    auto& transaction = m_objectStore.transaction();
     if (!transaction.isActive()) {
         ec.code = IDBDatabaseException::TransactionInactiveError;
         ec.message = ASCIILiteral("Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.");
@@ -198,7 +198,7 @@ RefPtr<IDBRequest> IDBIndex::doCount(ExecState& execState, const IDBKeyRangeData
 RefPtr<IDBRequest> IDBIndex::openKeyCursor(ExecState& execState, IDBKeyRange* range, const String& directionString, ExceptionCodeWithMessage& ec)
 {
     LOG(IndexedDB, "IDBIndex::openKeyCursor");
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     if (m_deleted || m_objectStore.isDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -206,7 +206,7 @@ RefPtr<IDBRequest> IDBIndex::openKeyCursor(ExecState& execState, IDBKeyRange* ra
         return nullptr;
     }
 
-    if (!m_objectStore.modernTransaction().isActive()) {
+    if (!m_objectStore.transaction().isActive()) {
         ec.code = IDBDatabaseException::TransactionInactiveError;
         ec.message = ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.");
         return nullptr;
@@ -218,8 +218,8 @@ RefPtr<IDBRequest> IDBIndex::openKeyCursor(ExecState& execState, IDBKeyRange* ra
         return nullptr;
     }
 
-    auto info = IDBCursorInfo::indexCursor(m_objectStore.modernTransaction(), m_objectStore.info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly);
-    return m_objectStore.modernTransaction().requestOpenCursor(execState, *this, info);
+    auto info = IDBCursorInfo::indexCursor(m_objectStore.transaction(), m_objectStore.info().identifier(), m_info.identifier(), range, direction, IndexedDB::CursorType::KeyOnly);
+    return m_objectStore.transaction().requestOpenCursor(execState, *this, info);
 }
 
 RefPtr<IDBRequest> IDBIndex::openKeyCursor(ExecState& execState, JSValue key, const String& direction, ExceptionCodeWithMessage& ec)
@@ -256,7 +256,7 @@ RefPtr<IDBRequest> IDBIndex::get(ExecState& execState, JSValue key, ExceptionCod
 
 RefPtr<IDBRequest> IDBIndex::doGet(ExecState& execState, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     if (m_deleted || m_objectStore.isDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -269,7 +269,7 @@ RefPtr<IDBRequest> IDBIndex::doGet(ExecState& execState, const IDBKeyRangeData&
         return nullptr;
     }
 
-    auto& transaction = m_objectStore.modernTransaction();
+    auto& transaction = m_objectStore.transaction();
     if (!transaction.isActive()) {
         ec.code = IDBDatabaseException::TransactionInactiveError;
         ec.message = ASCIILiteral("Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.");
@@ -302,7 +302,7 @@ RefPtr<IDBRequest> IDBIndex::getKey(ExecState& execState, JSValue key, Exception
 
 RefPtr<IDBRequest> IDBIndex::doGetKey(ExecState& execState, const IDBKeyRangeData& range, ExceptionCodeWithMessage& ec)
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     if (m_deleted || m_objectStore.isDeleted()) {
         ec.code = IDBDatabaseException::InvalidStateError;
@@ -315,7 +315,7 @@ RefPtr<IDBRequest> IDBIndex::doGetKey(ExecState& execState, const IDBKeyRangeDat
         return nullptr;
     }
 
-    auto& transaction = m_objectStore.modernTransaction();
+    auto& transaction = m_objectStore.transaction();
     if (!transaction.isActive()) {
         ec.code = IDBDatabaseException::TransactionInactiveError;
         ec.message = ASCIILiteral("Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.");
@@ -327,7 +327,7 @@ RefPtr<IDBRequest> IDBIndex::doGetKey(ExecState& execState, const IDBKeyRangeDat
 
 void IDBIndex::markAsDeleted()
 {
-    ASSERT(currentThread() == m_objectStore.modernTransaction().database().originThreadID());
+    ASSERT(currentThread() == m_objectStore.transaction().database().originThreadID());
 
     ASSERT(!m_deleted);
     m_deleted = true;
index aa2d0e3..6424197 100644 (file)
@@ -48,7 +48,7 @@ public:
     virtual ~IDBIndex();
 
     const String& name() const;
-    RefPtr<IDBObjectStore> objectStore();
+    IDBObjectStore& objectStore();
     const IDBKeyPath& keyPath() const;
     bool unique() const;
     bool multiEntry() const;
@@ -69,14 +69,14 @@ public:
 
     const IDBIndexInfo& info() const { return m_info; }
 
-    IDBObjectStore& modernObjectStore() { return m_objectStore; }
-
     void markAsDeleted();
     bool isDeleted() const { return m_deleted; }
 
     void ref();
     void deref();
 
+    void* objectStoreAsOpaqueRoot() { return &m_objectStore; }
+
 private:
     RefPtr<IDBRequest> doCount(JSC::ExecState&, const IDBKeyRangeData&, ExceptionCodeWithMessage&);
     RefPtr<IDBRequest> doGet(JSC::ExecState&, const IDBKeyRangeData&, ExceptionCodeWithMessage&);
index 4ffdbf4..e912aef 100644 (file)
@@ -112,10 +112,10 @@ RefPtr<DOMStringList> IDBObjectStore::indexNames() const
     return indexNames;
 }
 
-RefPtr<IDBTransaction> IDBObjectStore::transaction()
+IDBTransaction& IDBObjectStore::transaction()
 {
-    ASSERT(currentThread() == m_transaction->database().originThreadID());\
-    return &m_transaction.get();
+    ASSERT(currentThread() == m_transaction->database().originThreadID());
+    return m_transaction.get();
 }
 
 bool IDBObjectStore::autoIncrement() const
@@ -384,11 +384,6 @@ RefPtr<IDBRequest> IDBObjectStore::doDelete(ExecState& execState, IDBKeyRange* k
 
 RefPtr<IDBRequest> IDBObjectStore::deleteFunction(ExecState& execState, JSValue key, ExceptionCodeWithMessage& ec)
 {
-    return modernDelete(execState, key, ec);
-}
-
-RefPtr<IDBRequest> IDBObjectStore::modernDelete(ExecState& execState, JSValue key, ExceptionCodeWithMessage& ec)
-{
     Ref<IDBKey> idbKey = scriptValueToIDBKey(execState, key);
     if (!idbKey->isValid()) {
         ec.code = IDBDatabaseException::DataError;
index a8dec7d..3ecb901 100644 (file)
@@ -62,7 +62,7 @@ public:
     const String& name() const;
     const IDBKeyPath& keyPath() const;
     RefPtr<DOMStringList> indexNames() const;
-    RefPtr<IDBTransaction> transaction();
+    IDBTransaction& transaction();
     bool autoIncrement() const;
 
     struct IndexParameters {
@@ -86,16 +86,12 @@ public:
     RefPtr<IDBRequest> count(JSC::ExecState&, JSC::JSValue key, ExceptionCodeWithMessage&);
 
     RefPtr<IDBRequest> putForCursorUpdate(JSC::ExecState&, JSC::JSValue, JSC::JSValue key, ExceptionCodeWithMessage&);
-    RefPtr<IDBRequest> modernDelete(JSC::ExecState&, JSC::JSValue key, ExceptionCodeWithMessage&);
 
     void markAsDeleted();
     bool isDeleted() const { return m_deleted; }
 
     const IDBObjectStoreInfo& info() const { return m_info; }
 
-    // FIXME: After removing LegacyIDB and folding abstract/implementation classes together, this will no longer be necessary.
-    IDBTransaction& modernTransaction() { return m_transaction.get(); }
-
     void rollbackInfoForVersionChangeAbort();
 
     void visitReferencedIndexes(JSC::SlotVisitor&) const;
index 4e16a60..4889e67 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
 void JSIDBIndex::visitAdditionalChildren(SlotVisitor& visitor)
 {
-    visitor.addOpaqueRoot(&static_cast<IDBIndex&>(wrapped()).modernObjectStore());
+    visitor.addOpaqueRoot(static_cast<IDBIndex&>(wrapped()).objectStoreAsOpaqueRoot());
 }
 
 } // namespace WebCore