PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, PassRefPtr<IDBKey> key, const String& direction, ExceptionCode& ec) { IDB_TRACE("IDBIndex::openKeyCursor"); RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(key, ec); if (ec) return 0; return openKeyCursor(context, keyRange.release(), direction, ec); }
RefPtr<IDBRequest> LegacyIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec) { LOG(StorageAPI, "LegacyIndex::openKeyCursor"); RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec); if (ec) return 0; return openKeyCursor(context, keyRange.get(), direction, ec); }
ExceptionOr<Ref<IDBRequest>> IDBIndex::openKeyCursor(ExecState& execState, JSValue key, const String& direction) { LOG(IndexedDB, "IDBIndex::openKeyCursor"); auto keyRange = IDBKeyRange::only(execState, key); if (keyRange.hasException()) return Exception { IDBDatabaseException::DataError, ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.") }; return openKeyCursor(execState, keyRange.releaseReturnValue().ptr(), direction); }
RefPtr<WebCore::IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode& ec) { LOG(IndexedDB, "IDBIndex::openKeyCursor"); RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec); if (ec) return nullptr; return openKeyCursor(context, keyRange.get(), direction, ec); }
RefPtr<WebCore::IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, const String& direction, ExceptionCodeWithMessage& ec) { LOG(IndexedDB, "IDBIndex::openKeyCursor"); RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec.code); if (ec.code) { ec.message = ASCIILiteral("Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key."); return nullptr; } return openKeyCursor(context, keyRange.get(), direction, ec); }