[webkit-reviews] review granted: [Bug 25711] HTML5 Database becomes locked if a transaction is in progress when the page is refreshed. : [Attachment 32125] New patch.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 2 09:21:42 PDT 2009
Antti Koivisto <koivisto at iki.fi> has granted Ben Murdoch <benm at google.com>'s
request for review:
Bug 25711: HTML5 Database becomes locked if a transaction is in progress when
the page is refreshed.
https://bugs.webkit.org/show_bug.cgi?id=25711
Attachment 32125: New patch.
https://bugs.webkit.org/attachment.cgi?id=32125&action=review
------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
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()
More information about the webkit-reviews
mailing list