IDBRequest::IDBRequest(ScriptExecutionContext& context, IDBObjectStore& objectStore, IDBTransaction& transaction) : IDBOpenDBRequest(&context) , m_transaction(&transaction) , m_connection(transaction.serverConnection()) , m_resourceIdentifier(transaction.serverConnection()) , m_source(IDBAny::create(objectStore)) { suspendIfNeeded(); }
IDBRequest::IDBRequest(ScriptExecutionContext& context, IDBCursor& cursor, IDBTransaction& transaction) : IDBOpenDBRequest(&context) , m_transaction(&transaction) , m_connection(transaction.serverConnection()) , m_resourceIdentifier(transaction.serverConnection()) , m_source(cursor.source()) , m_pendingCursor(&cursor) { suspendIfNeeded(); cursor.setRequest(*this); }
IDBRequest::IDBRequest(ScriptExecutionContext& context, IDBCursor& cursor, IDBTransaction& transaction) : IDBOpenDBRequest(&context) , m_transaction(&transaction) , m_connection(transaction.serverConnection()) , m_resourceIdentifier(transaction.serverConnection()) , m_pendingCursor(&cursor) { suspendIfNeeded(); cursor.setRequest(*this); auto* cursorSource = cursor.source(); ASSERT(cursorSource); ASSERT(cursorSource->type() == IDBAny::Type::IDBObjectStore || cursorSource->type() == IDBAny::Type::IDBIndex); m_source = cursorSource; }