[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
Thu Jul 2 09:21:42 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=25711
koivisto at iki.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #32125|review? |review+
Flag| |
------- Comment #34 from koivisto at iki.fi 2009-07-02 09:21 PDT -------
(From update of attachment 32125)
Is it really always true that recordDatabaseOpen/recordDatabaseClose can't get
called in the database thread? If so then obviously you won't need mutexes, but
please make sure.
> + // Close the databases that we ran transactions on. This ensures that if any transactions are still open, they are rolled back and we don't leave the database in an
> + // inconsistent or locked state.
> + if (m_openDatabaseSet.size() > 0) {
> + // As the call to close will modify the original set, we must take a copy to iterate over.
> + DatabaseSet openSetCopy = m_openDatabaseSet;
> + DatabaseSet::iterator end = openSetCopy.end();
> + for (DatabaseSet::iterator it = openSetCopy.begin(); it != end; ++it)
> + (*it)->close();
You should use HashSet::swap() instead of making a copy before iterating.
r=me with swap()
--
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