void IDBCursor::close() { // The notifier may be the last reference to this cursor. RefPtrWillBeRawPtr<IDBCursor> protect(this); handleBlobAcks(); m_request.clear(); m_backend.clear(); }
ScriptValue IDBRequest::result(ExceptionState& exceptionState) { if (m_readyState != DONE) { exceptionState.throwDOMException(InvalidStateError, IDBDatabase::requestNotFinishedErrorMessage); return ScriptValue(); } if (m_contextStopped || !executionContext()) return ScriptValue(); m_resultDirty = false; ScriptValue value = idbAnyToScriptValue(m_scriptState.get(), m_result); handleBlobAcks(); return value; }
void IDBCursor::checkForReferenceCycle() { // If this cursor and its request have the only references // to each other, then explicitly break the cycle. if (!m_request || m_request->getResultCursor() != this) return; if (!hasOneRef() || !m_request->hasOneRef()) return; handleBlobAcks(); m_request.clear(); }
void IDBCursor::setValueReady(IDBKey* key, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<blink::WebBlobInfo> > blobInfo) { m_key = key; m_keyDirty = true; m_primaryKey = primaryKey; m_primaryKeyDirty = true; if (isCursorWithValue()) { m_value = value; handleBlobAcks(); m_blobInfo = blobInfo; m_valueDirty = true; } m_gotValue = true; }
ScriptValue IDBCursor::value(ScriptState* scriptState) { ASSERT(isCursorWithValue()); IDBObjectStore* objectStore = effectiveObjectStore(); const IDBObjectStoreMetadata& metadata = objectStore->metadata(); IDBAny* value; if (metadata.autoIncrement && !metadata.keyPath.isNull()) { value = IDBAny::create(m_value, m_blobInfo.get(), m_primaryKey, metadata.keyPath); #ifndef NDEBUG assertPrimaryKeyValidOrInjectable(scriptState, m_value, m_blobInfo.get(), m_primaryKey, metadata.keyPath); #endif } else { value = IDBAny::create(m_value, m_blobInfo.get()); } m_valueDirty = false; ScriptValue scriptValue = idbAnyToScriptValue(scriptState, value); handleBlobAcks(); return scriptValue; }
void IDBRequest::dispose() { handleBlobAcks(); }
IDBCursor::~IDBCursor() { handleBlobAcks(); }
void IDBCursor::close() { handleBlobAcks(); m_request.clear(); m_backend.clear(); }
IDBRequest::~IDBRequest() { ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !executionContext()); handleBlobAcks(); }