[webkit-reviews] review requested: [Bug 40607] Implement the sync DB API in workers : [Attachment 58744] patch #1: implement DatabaseSync::openDatabaseSync()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 14 20:29:46 PDT 2010


Dumitru Daniliuc <dumi at chromium.org> has asked	for review:
Bug 40607: Implement the sync DB API in workers
https://bugs.webkit.org/show_bug.cgi?id=40607

Attachment 58744: patch #1: implement DatabaseSync::openDatabaseSync()
https://bugs.webkit.org/attachment.cgi?id=58744&action=review

------- Additional Comments from Dumitru Daniliuc <dumi at chromium.org>
All new code in DatabaseSync.cpp was copy-pasted from Database.cpp (with a
couple of trivial changes, such as removing calls to DatabaseThread).

The plan is to:
1. Implement DatabaseSync.cpp one "feature" at a time (openDatabaseSync(),
transaction(), clean up everything properly when the worker shuts down in the
middle of a DB operation, etc.)
2. Copy-paste code from Database.cpp to DatabaseSync.cpp and modify it as
needed, in order to make each feature in DatabaseSync.cpp work.
3. Once feature 'n' is landed in DatabaseSync.cpp, work on feature 'n + 1', and
in parallel work on moving the duplicate code introduced in feature 'n' to
AbstractDatabase.

I think the advantages of this approach are:
1. We _know_ what code is duplicated when moving it from Database/DatabaseSync
to AbstractDatabase, instead of guessing.
2. Moving duplicate code to AbstractDatabase doesn't block the DatabaseSync
implementation; instead, it can be done in parallel.


More information about the webkit-reviews mailing list