The test case from bug 16876 still fails with an assertion failure for me, just a different one: Starting DatabaseThread 0x18de4fd0 Iteration of main loop for DatabaseThread 0x18de4fd0 Iteration of main loop for DatabaseThread 0x18de4fd0 Performing DatabaseTask 0x18de4ee0 SQL - prepare - PRAGMA temp_store = MEMORY; ASSERTION FAILED: currentThread() == m_openingThread (/Users/ap/Safari/OpenSource/WebCore/platform/sql/SQLiteDatabase.h:97 sqlite3* WebCore::SQLiteDatabase::sqlite3Handle() const)
<rdar://problem/5720240>
Hmm, I'm getting the same assertion failure just opening <http://webkit.org/misc/DatabaseExample.html>
Alexey, I'm intrigued by that - I certainly can open the example with no problems... there must be something different going on between your setup and mine, I wish I could figure out what it is!
This isn't a threading issue in fact - m_openingThread is just uninitialized (other than to zero). I'm running shipping Safari, with WebKit slightly hacked for the delegate-less client; it's possible that my hack is wrong and is causing the problem. Brady is going to try deleting ~/Library/{WebKit|Safari}/Databases to see if that makes the problem happen for him.
I'm seeing that DatabaseTracker::openTrackerDatabase is always called with createIfDoesNotExist == false, so the tracker database is never created/opened. And since it's never opened, m_openingThread remains 0.
OK, I see that the delegate calls setQuota, which magically calls openTrackerDatabase with createIfDoesNotExist == true. This looks weird, but since there is no bug for a client that properly implements the required delegate, I am closing the bug, sorry for the noise.