[Webkit-unassigned] [Bug 25711] HTML5 Database becomes locked if a transaction is in progress when the page is refreshed.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 16 12:36:05 PDT 2009


------- Comment #22 from benm at google.com  2009-06-16 12:36 PDT -------
Thanks again for the comments Michael. You're right, that would be a race
condition. It's been a while since I looked at the root of this bug/patch so I
decided to go back and try a different approach... I think the new solution is
much cleaner. The SQLite documentation mentions that if you call sqlite3_close
on a database with an open transaction, that transaction is automatically
rolled back. The call to close needs to come from the database thread so that
we can be sure a statement isn't executing when the call is made. So, my new
approach is to maintain a list in the DatabaseThread class of the databases
that we have worked on in that thread. Before that thread terminates, I iterate
that list and invoke close on each database. So if a transaction had scheduled
cleanup steps on the thread asynchronously it doesn't matter as the transaction
will  be rolled back and the database unlocked.

New patch to follow, any comments appreciated.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list