Changeset 192825 in webkit
- Timestamp:
- Nov 30, 2015 1:51:06 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192819 r192825 1 2015-11-30 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: Correct handling of cursors finishing iteration. 4 https://bugs.webkit.org/show_bug.cgi?id=151664 5 6 Reviewed by Andy Estes. 7 8 * platform/mac-wk1/TestExpectations: 9 1 10 2015-11-30 Myles C. Maxfield <mmaxfield@apple.com> 2 11 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r192813 r192825 73 73 # But Modern IndexedDB is. 74 74 storage/indexeddb/aborted-versionchange-closes.html [ Pass ] 75 storage/indexeddb/cursor-finished.html [ Pass ] 75 76 storage/indexeddb/modern [ Pass ] 76 77 storage/indexeddb/mozilla/add-twice-failure.html [ Pass ] -
trunk/Source/WebCore/ChangeLog
r192819 r192825 1 2015-11-30 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: Correct handling of cursors finishing iteration. 4 https://bugs.webkit.org/show_bug.cgi?id=151664 5 6 Reviewed by Andy Estes. 7 8 No new tests (At least one previously failing test now passes). 9 10 * Modules/indexeddb/client/IDBCursorImpl.cpp: 11 (WebCore::IDBClient::IDBCursor::setGetResult): 12 13 * Modules/indexeddb/client/IDBObjectStoreImpl.cpp: 14 (WebCore::IDBClient::IDBObjectStore::putOrAdd): 15 1 16 2015-11-30 Myles C. Maxfield <mmaxfield@apple.com> 2 17 -
trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp
r192806 r192825 289 289 return; 290 290 291 if (!getResult.isDefined()) { 292 m_deprecatedCurrentKey = { }; 293 m_deprecatedCurrentPrimaryKey = { }; 294 m_currentPrimaryKeyData = { }; 295 m_deprecatedCurrentValue = { }; 296 297 m_gotValue = false; 298 return; 299 } 300 291 301 m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData()); 292 302 m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData()); -
trunk/Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp
r192806 r192825 234 234 235 235 if (m_transaction->isReadOnly()) { 236 ec = static_cast<ExceptionCode>(IDBExceptionCode::ReadOnlyError);237 return nullptr; 238 } 239 240 if (!m_transaction->isActive()) { 241 ec = static_cast<ExceptionCode>(IDBExceptionCode::TransactionInactiveError);242 return nullptr; 243 } 244 245 if (m_deleted) { 246 ec = I NVALID_STATE_ERR;236 ec = IDBDatabaseException::ReadOnlyError; 237 return nullptr; 238 } 239 240 if (!m_transaction->isActive()) { 241 ec = IDBDatabaseException::TransactionInactiveError; 242 return nullptr; 243 } 244 245 if (m_deleted) { 246 ec = IDBDatabaseException::InvalidStateError; 247 247 return nullptr; 248 248 } … … 250 250 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(&state, value, nullptr, nullptr); 251 251 if (state.hadException()) { 252 ec = DATA_CLONE_ERR;252 ec = IDBDatabaseException::DataCloneError; 253 253 return nullptr; 254 254 } … … 256 256 if (serializedValue->hasBlobURLs()) { 257 257 // FIXME: Add Blob/File/FileList support 258 ec = DATA_CLONE_ERR;258 ec = IDBDatabaseException::DataCloneError; 259 259 return nullptr; 260 260 } 261 261 262 262 if (key && key->type() == KeyType::Invalid) { 263 ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);263 ec = IDBDatabaseException::DataError; 264 264 return nullptr; 265 265 } … … 269 269 if (usesInlineKeys && inlineKeyCheck == InlineKeyCheck::Perform) { 270 270 if (key) { 271 ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);271 ec = IDBDatabaseException::DataError; 272 272 return nullptr; 273 273 } … … 275 275 RefPtr<IDBKey> keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, m_info.keyPath()); 276 276 if (keyPathKey && !keyPathKey->isValid()) { 277 ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);277 ec = IDBDatabaseException::DataError; 278 278 return nullptr; 279 279 } … … 282 282 if (usesKeyGenerator) { 283 283 if (!canInjectIDBKeyIntoScriptValue(state, value, m_info.keyPath())) { 284 ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);284 ec = IDBDatabaseException::DataError; 285 285 return nullptr; 286 286 } 287 287 } else { 288 ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);288 ec = IDBDatabaseException::DataError; 289 289 return nullptr; 290 290 } … … 296 296 } 297 297 } else if (!usesKeyGenerator && !key) { 298 ec = static_cast<ExceptionCode>(IDBExceptionCode::DataError);298 ec = IDBDatabaseException::DataError; 299 299 return nullptr; 300 300 } … … 302 302 auto context = scriptExecutionContextFromExecState(&state); 303 303 if (!context) { 304 ec = static_cast<ExceptionCode>(IDBExceptionCode::Unknown);304 ec = IDBDatabaseException::UnknownError; 305 305 return nullptr; 306 306 }
Note: See TracChangeset
for help on using the changeset viewer.