[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 13:40:03 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25711





------- Comment #24 from michaeln at google.com  2009-06-16 13:40 PDT -------
A more systemic approach... nice!

In general I like it. "If the thread is shutting down, be sure to close any
handles the thread has ever worked with." More systemically addresses the cause
of the bug you're bumping into.

I think this approach is valid since tasks for a given Database are always
handled on the same DatabaseThread (looks like theres a db thread per
document). If that were ever to change, this approach may not be valid. Not
sure what the Database 'owners' have in mind for future developments.

Have you considered removing the the handle from the collection when a
DatabaseCloseTask executes on the thread? The expected case is that none in the
collection should need to be closed. May be nice of that corresponded with an
empty collection. A method on Database could be useful for determining when the
Database needs to be added/removed from the set... bool Database.isOpen().
After task execution, if isOpen() add it, otherwise remove it.

I think you can use HashSet<RefPtr<Database> > to avoid the manual
addref/removeref calls. And after iterating and calling close on them, clear
the collection to drop the refs.


-- 
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