WebKit Bugzilla
Attachment 359313 Details for
Bug 193093
: IndexedDB: UniqueIDBDatabase should not be freed if the database task queue is not empty.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-193093-20190116144814.patch (text/plain), 3.36 KB, created by
Sihui Liu
on 2019-01-16 14:48:14 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2019-01-16 14:48:14 PST
Size:
3.36 KB
patch
obsolete
>Subversion Revision: 240043 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3daa85b95c6cb4311f0da5f497ddd9c0aa6ab53b..d85682f3365013c6c8acf0cb317e9ecc7478eb47 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-16 Sihui Liu <sihui_liu@apple.com> >+ >+ IndexedDB: UniqueIDBDatabase should not be freed if the database task queue is not empty. >+ https://bugs.webkit.org/show_bug.cgi?id=193093 >+ >+ Reviewed by Brady Eidson. >+ >+ No new tests (OOPS!). >+ >+ performUnconditionalDeleteBackingStore killed the database task queue immediately, but performPrefetchCursor >+ task may be scheduled behind performUnconditionalDeleteBackingStore on database thread. >+ >+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp: >+ (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose): >+ (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor): >+ (WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose): >+ > 2019-01-16 Youenn Fablet <youenn@apple.com> > > Prevent WorkerRunLoop::runInMode from spinning in nested cases >diff --git a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp >index 7ce94bab6957818a216d48b090d0b5219458891b..238320d343552b26ebc448e9768bd6d07b35d4fe 100644 >--- a/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp >+++ b/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp >@@ -292,7 +292,10 @@ void UniqueIDBDatabase::shutdownForClose() > m_backingStoreSupportsSimultaneousTransactions = false; > m_backingStoreIsEphemeral = false; > >- ASSERT(m_databaseQueue.isEmpty()); >+ if (!m_databaseQueue.isEmpty()) { >+ postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::shutdownForClose)); >+ return; >+ } > m_databaseQueue.kill(); > > postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didShutdownForClose)); >@@ -1271,10 +1274,10 @@ void UniqueIDBDatabase::performPrefetchCursor(const IDBResourceIdentifier& trans > ASSERT(m_cursorPrefetches.contains(cursorIdentifier)); > LOG(IndexedDB, "(db) UniqueIDBDatabase::performPrefetchCursor"); > >- if (m_backingStore->prefetchCursor(transactionIdentifier, cursorIdentifier)) >- postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performPrefetchCursor, transactionIdentifier, cursorIdentifier)); >- else >+ if (m_hardClosedForUserDelete || !m_backingStore->prefetchCursor(transactionIdentifier, cursorIdentifier)) > m_cursorPrefetches.remove(cursorIdentifier); >+ else >+ postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performPrefetchCursor, transactionIdentifier, cursorIdentifier)); > } > > void UniqueIDBDatabase::didPerformIterateCursor(uint64_t callbackIdentifier, const IDBError& error, const IDBGetResult& result) >@@ -1784,7 +1787,7 @@ void UniqueIDBDatabase::maybeFinishHardClose() > > bool UniqueIDBDatabase::isDoneWithHardClose() > { >- return m_databaseQueue.isKilled() && m_clientClosePendingDatabaseConnections.isEmpty() && m_serverClosePendingDatabaseConnections.isEmpty(); >+ return m_databaseReplyQueue.isKilled() && m_clientClosePendingDatabaseConnections.isEmpty() && m_serverClosePendingDatabaseConnections.isEmpty(); > } > > static void errorOpenDBRequestForUserDelete(ServerOpenDBRequest& request)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193093
:
358224
|
359313
|
359319