void IDBTransaction::iterateCursor(IDBCursor& cursor, const IDBKeyData& key, unsigned long count) { LOG(IndexedDB, "IDBTransaction::iterateCursor"); ASSERT(isActive()); ASSERT(cursor.request()); addRequest(*cursor.request()); auto operation = createTransactionOperation(*this, *cursor.request(), &IDBTransaction::didIterateCursorOnServer, &IDBTransaction::iterateCursorOnServer, key, count); scheduleOperation(WTFMove(operation)); }
void IDBRequest::checkForReferenceCycle() { // If this request and its cursor have the only references // to each other, then explicitly break the cycle. IDBCursor* cursor = getResultCursor(); if (!cursor || cursor->request() != this) return; if (!hasOneRef() || !cursor->hasOneRef()) return; m_result.clear(); }