| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 145 } |
| 146 | 146 |
| 147 m_request->setPendingCursor(this); | 147 m_request->setPendingCursor(this); |
| 148 m_gotValue = false; | 148 m_gotValue = false; |
| 149 m_backend->advance(count, WebIDBCallbacksImpl::create(m_request).leakPtr()); | 149 m_backend->advance(count, WebIDBCallbacksImpl::create(m_request).leakPtr()); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& ke
yValue, ExceptionState& exceptionState) | 152 void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& ke
yValue, ExceptionState& exceptionState) |
| 153 { | 153 { |
| 154 IDB_TRACE("IDBCursor::continue"); | 154 IDB_TRACE("IDBCursor::continue"); |
| 155 IDBKey* key = keyValue.isUndefined() || keyValue.isNull() ? nullptr : script
ValueToIDBKey(scriptState->isolate(), keyValue); | 155 IDBKey* key = keyValue.isEmpty() || keyValue.isUndefined() || keyValue.isNul
l() ? nullptr : scriptValueToIDBKey(scriptState->isolate(), keyValue); |
| 156 if (key && !key->isValid()) { | 156 if (key && !key->isValid()) { |
| 157 exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErro
rMessage); | 157 exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErro
rMessage); |
| 158 return; | 158 return; |
| 159 } | 159 } |
| 160 continueFunction(key, 0, exceptionState); | 160 continueFunction(key, 0, exceptionState); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue&
keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState) | 163 void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue&
keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState) |
| 164 { | 164 { |
| 165 IDB_TRACE("IDBCursor::continuePrimaryKey"); | 165 IDB_TRACE("IDBCursor::continuePrimaryKey"); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 case WebIDBCursorDirectionPrevNoDuplicate: | 387 case WebIDBCursorDirectionPrevNoDuplicate: |
| 388 return IndexedDBNames::prevunique; | 388 return IndexedDBNames::prevunique; |
| 389 | 389 |
| 390 default: | 390 default: |
| 391 ASSERT_NOT_REACHED(); | 391 ASSERT_NOT_REACHED(); |
| 392 return IndexedDBNames::next; | 392 return IndexedDBNames::next; |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace blink | 396 } // namespace blink |
| OLD | NEW |