IDBRequest::IDBRequest(ScriptExecutionContext& context, IDBObjectStore& objectStore, IDBTransaction& transaction) : IDBActiveDOMObject(&context) , m_transaction(&transaction) , m_resourceIdentifier(transaction.connectionProxy()) , m_source(&objectStore) , m_connectionProxy(transaction.database().connectionProxy()) { m_result = NullResultType::Empty; suspendIfNeeded(); }
IDBRequest::IDBRequest(ScriptExecutionContext& context, IDBCursor& cursor, IDBTransaction& transaction) : IDBActiveDOMObject(&context) , m_transaction(&transaction) , m_resourceIdentifier(transaction.connectionProxy()) , m_pendingCursor(&cursor) , m_connectionProxy(transaction.database().connectionProxy()) { suspendIfNeeded(); WTF::switchOn(cursor.source(), [this] (const auto& value) { this->m_source = IDBRequest::Source { value }; } ); m_result = NullResultType::Empty; cursor.setRequest(*this); }