[Webkit-unassigned] [Bug 27967] Decouple the code that deals with the main DB and quota management from the rest of the DB code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 7 15:42:24 PDT 2009


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





--- Comment #5 from Dumitru Daniliuc <dumi at chromium.org>  2009-08-07 15:42:22 PDT ---
(In reply to comment #4)
> (From update of attachment 34296 [details])
> I need more background in the ChangeLog here.

Added some of the following explanation to ChangeLog.

> Why are we doing this?  So that Chromium can have the TransactionClient in
> a separate process?

Not exactly. SQLTransactionClient is supposed to have 2 functions:

1. (Not important for us at this point) Be a centralized place for getting
notifications about certain events in a transaction.
2. (The main reason we're doing this) Provide an abstraction layer that allows
each WebKit port to define how transactions interact with the main DB. For
example, in Chromium we want to access the main DB only in the browser
process.* So while WebCore's default implementation makes direct calls to
DatabaseTracker, Chromium's implementation will send IPCs to the browser
process.

* First, there's a security concern: we don't want a malicious renderer to be
able to corrupt the main DB. And second, the main DB stores a bit of state
(like per-origin quota) that needs to be synchronized across all renderers.

> 0 seems like the wrong default here:
>  71                                              PassRefPtr<VoidCallback>,
> PassRefPtr<SQLTransactionWrapper>, SQLTransactionClient* transactionClient =
> 0);
> 
> I would think that we would want transactions to "work out of the box" for
> webkit clients.  it seems possible here to construct a transaction which
> would not work correctly out of the box!

removed the default.

> Style:
>  48 void SQLTransactionClient::databaseSizeChanged(Database* database) {

fixed.

> Why is a copy needed here?
>  59     RefPtr<SecurityOrigin> origin = database->securityOriginCopy();

it seems to be the only way to get the origin for a database from a Database
object.

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



More information about the webkit-unassigned mailing list