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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(m_requ
est->requestState(), value, keyPath); | 129 RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(m_requ
est->requestState(), value, keyPath); |
130 if (!keyPathKey || !keyPathKey->isEqual(m_currentPrimaryKey.get())) { | 130 if (!keyPathKey || !keyPathKey->isEqual(m_currentPrimaryKey.get())) { |
131 es.throwDOMException(DataError, "The effective object store of this
cursor uses in-line keys and evaluating the key path of the value parameter resu
lts in a different value than the cursor's effective key."); | 131 es.throwDOMException(DataError, "The effective object store of this
cursor uses in-line keys and evaluating the key path of the value parameter resu
lts in a different value than the cursor's effective key."); |
132 return 0; | 132 return 0; |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 return objectStore->put(IDBDatabaseBackendInterface::CursorUpdate, IDBAny::c
reate(this), state, value, m_currentPrimaryKey, es); | 136 return objectStore->put(IDBDatabaseBackendInterface::CursorUpdate, IDBAny::c
reate(this), state, value, m_currentPrimaryKey, es); |
137 } | 137 } |
138 | 138 |
139 void IDBCursor::advance(unsigned long count, ExceptionState& es) | 139 void IDBCursor::advance(unsigned count, ExceptionState& es) |
140 { | 140 { |
141 IDB_TRACE("IDBCursor::advance"); | 141 IDB_TRACE("IDBCursor::advance"); |
142 if (!m_gotValue) { | 142 if (!m_gotValue) { |
143 es.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage
); | 143 es.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage
); |
144 return; | 144 return; |
145 } | 145 } |
146 if (isDeleted()) { | 146 if (isDeleted()) { |
147 es.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorM
essage); | 147 es.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorM
essage); |
148 return; | 148 return; |
149 } | 149 } |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 case IndexedDB::CursorPrevNoDuplicate: | 349 case IndexedDB::CursorPrevNoDuplicate: |
350 return IDBCursor::directionPrevUnique(); | 350 return IDBCursor::directionPrevUnique(); |
351 | 351 |
352 default: | 352 default: |
353 ASSERT_NOT_REACHED(); | 353 ASSERT_NOT_REACHED(); |
354 return IDBCursor::directionNext(); | 354 return IDBCursor::directionNext(); |
355 } | 355 } |
356 } | 356 } |
357 | 357 |
358 } // namespace WebCore | 358 } // namespace WebCore |
OLD | NEW |