Modern IDB: SQLite backend doesn't handle mutation during cursor iteration.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jan 2016 22:52:05 +0000 (22:52 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jan 2016 22:52:05 +0000 (22:52 +0000)
commit29a3c2f64a2a9fff85a4f327e51dc85f42c7d497
treef03078f5e15263b5a313065db20686c753cd801a
parent77ee30d7c429716c7a5d48886a3141773378a55c
Modern IDB: SQLite backend doesn't handle mutation during cursor iteration.
https://bugs.webkit.org/show_bug.cgi?id=153614

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (A few failing tests pass, a few get closer).

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange): Call notifyCursorsOfChanges.
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Ditto.

* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
(WebCore::IDBServer::SQLiteIDBCursor::~SQLiteIDBCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.h:

* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor): Remember these transient backing
  store cursors so they can be notified of changes.
(WebCore::IDBServer::SQLiteIDBTransaction::closeCursor): Handle removing the cursor from the right set.
(WebCore::IDBServer::SQLiteIDBTransaction::notifyCursorsOfChanges):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h
Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h