Bug 191326

Summary: RELEASE_ASSERT(!m_hardClosedForUserDelete) fails in WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, beidson, cdumez, commit-queue, ews-watchlist, ggaren, jsbell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Sihui Liu 2018-11-06 13:07:15 PST
From release assertion added in r236747, we knew UniqueIDBDatabase::enqueueTransaction is invoking the timer after database connection closed.
Comment 1 Sihui Liu 2018-11-06 13:08:22 PST
<rdar://problem/45769269>
Comment 2 Sihui Liu 2018-11-06 19:29:03 PST
Created attachment 354052 [details]
Patch
Comment 3 Sihui Liu 2018-11-07 14:15:10 PST
Created attachment 354150 [details]
Patch
Comment 4 EWS Watchlist 2018-11-07 14:19:28 PST
Attachment 354150 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:3602:  developmentRegion is not en.  [xcodeproj/settings] [5]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Geoffrey Garen 2018-11-07 15:12:41 PST
Comment on attachment 354150 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=354150&action=review

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:244
> +void UniqueIDBDatabaseConnection::deleteTransaction(UniqueIDBDatabaseTransaction& transaction)

Is this preferable to abortTransactionWithoutCallback?
Comment 6 Sihui Liu 2018-11-07 15:30:24 PST
Comment on attachment 354150 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=354150&action=review

>> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:244
>> +void UniqueIDBDatabaseConnection::deleteTransaction(UniqueIDBDatabaseTransaction& transaction)
> 
> Is this preferable to abortTransactionWithoutCallback?

We abort the transaction if it already begins; transaction in m_pendingTransactions is not activated/started yet.
Comment 7 Geoffrey Garen 2018-11-07 16:04:30 PST
Comment on attachment 354150 [details]
Patch

r=me
Comment 8 WebKit Commit Bot 2018-11-07 17:31:48 PST
Comment on attachment 354150 [details]
Patch

Clearing flags on attachment: 354150

Committed r237969: <https://trac.webkit.org/changeset/237969>
Comment 9 WebKit Commit Bot 2018-11-07 17:31:50 PST
All reviewed patches have been landed.  Closing bug.