void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState) { IDB_TRACE("IDBCursor::continuePrimaryKey"); if (m_source->type() != IDBAny::IDBIndexType) { exceptionState.throwDOMException(InvalidAccessError, "The cursor's source is not an index."); return; } if (m_direction != WebIDBCursorDirectionNext && m_direction != WebIDBCursorDirectionPrev) { exceptionState.throwDOMException(InvalidAccessError, "The cursor's direction is not 'next' or 'prev'."); return; } IDBKey* key = ScriptValue::to<IDBKey*>(scriptState->isolate(), keyValue, exceptionState); if (exceptionState.hadException()) return; if (!key->isValid()) { exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage); return; } IDBKey* primaryKey = ScriptValue::to<IDBKey*>(scriptState->isolate(), primaryKeyValue, exceptionState); if (exceptionState.hadException()) return; if (!primaryKey->isValid()) { exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage); return; } continueFunction(key, primaryKey, exceptionState); }
void IDBCursor::continueFunction(ScriptExecutionContext* context, ExceptionCode& ec) { if (!context) { ec = IDBDatabaseException::InvalidStateError; return; } continueFunction(IDBKeyData(), ec); }
void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& keyValue, ExceptionState& exceptionState) { IDB_TRACE("IDBCursor::continue"); IDBKey* key = keyValue.isUndefined() || keyValue.isNull() ? nullptr : scriptValueToIDBKey(scriptState->isolate(), keyValue); if (key && !key->isValid()) { exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage); return; } continueFunction(key, 0, exceptionState); }
void IDBCursor::continueFunction(ExecutionContext* context, const ScriptValue& keyValue, ExceptionState& exceptionState) { IDB_TRACE("IDBCursor::continue"); RefPtrWillBeRawPtr<IDBKey> key = keyValue.isUndefined() || keyValue.isNull() ? nullptr : scriptValueToIDBKey(toIsolate(context), keyValue); if (key && !key->isValid()) { exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage); return; } continueFunction(key.release(), nullptr, exceptionState); }
void IDBCursor::continueFunction(ScriptExecutionContext* context, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec) { if (!context) { ec = IDBDatabaseException::InvalidStateError; return; } DOMRequestState requestState(context); RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue); continueFunction(key.get(), ec); }
void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState) { IDB_TRACE("IDBCursor::continuePrimaryKey"); IDBKey* key = scriptValueToIDBKey(scriptState->isolate(), keyValue); IDBKey* primaryKey = scriptValueToIDBKey(scriptState->isolate(), primaryKeyValue); if (!key->isValid() || !primaryKey->isValid()) { exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage); return; } continueFunction(key, primaryKey, exceptionState); }
void IDBCursor::continuePrimaryKey(ExecutionContext* context, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState) { IDB_TRACE("IDBCursor::continuePrimaryKey"); RefPtrWillBeRawPtr<IDBKey> key = scriptValueToIDBKey(toIsolate(context), keyValue); RefPtrWillBeRawPtr<IDBKey> primaryKey = scriptValueToIDBKey(toIsolate(context), primaryKeyValue); if (!key->isValid() || !primaryKey->isValid()) { exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage); return; } continueFunction(key.release(), primaryKey.release(), exceptionState); }
bool runSludge () { loadedFunction * thisFunction = allRunningFunctions; loadedFunction * nextFunction; while (thisFunction) { nextFunction = thisFunction -> next; if (! thisFunction -> freezerLevel) { if (thisFunction -> timeLeft) { if (thisFunction -> timeLeft < 0) { if (! stillPlayingSound (findInSoundCache (speech -> lastFile))) { thisFunction -> timeLeft = 0; } } else if (! -- (thisFunction -> timeLeft)) { } } else { if (thisFunction -> isSpeech) { thisFunction -> isSpeech = false; killAllSpeech (); } if (! continueFunction (thisFunction)) return false; } } thisFunction = nextFunction; } if (loadNow) { if (loadNow[0] == ':') { saveGame (loadNow + 1); setVariable (saverFunc -> reg, SVT_INT, 1); } else { if (! loadGame (loadNow)) return false; } delete loadNow; loadNow = NULL; } return true; }
void IDBCursor::continueFunction(ScriptExecutionContext* context, const ScriptValue& keyValue, ExceptionCode& ec) { DOMRequestState requestState(context); RefPtr<IDBKey> key = scriptValueToIDBKey(&requestState, keyValue); continueFunction(key.release(), ec); }