Bug 106292 - webdatabase: Remove the need for the ProposedDatabase mechanism.
Summary: webdatabase: Remove the need for the ProposedDatabase mechanism.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-07 20:04 PST by Mark Lam
Modified: 2013-01-08 10:49 PST (History)
13 users (show)

See Also:


Attachments
Fix. (31.18 KB, patch)
2013-01-07 20:13 PST, Mark Lam
peter+ews: commit-queue-
Details | Formatted Diff | Diff
Fix. Resolves chromium and windows build breakage. (32.07 KB, patch)
2013-01-07 20:48 PST, Mark Lam
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2013-01-07 20:04:27 PST
In DatabaseTracker.cpp, there's a FIXME that says that "We should really just pass the details into this call, rather than using m_proposedDatabases."  This change achieves that.

Here's how things used to work:
1. DatabaseTracker::canEstablishDatabase() adds a DatabaseDetail to its m_proposedDatabase list.
2. It then calls DatabaseContext::databaseExceededQuota() to give the chrome client a chance to increase the quota.
3. Next, it removes the DatabaseDetails from m_proposedDatabase to revert step 1's action.

DatabaseContext::databaseExceededQuota() eventually calls the ChromeClient.  The ChromeClient in turn calls DatabaseTracker::detailsForNameAndOrigin() to get the detail for the database we're trying to open.  Because the database may not have been added to the tracker database, detailsForNameAndOrigin() would also check the m_proposedDatabase list for the details of the database that we're trying to add, and retrieve the needed details from there.

Here's how things work with this change:
1. The ProposedDatabase mechanism has been removed completely.  Instead, DatabaseTracker::canEstablishDatabase() will call DatabaseContext::databaseExceededQuota() with the needed DatabaseDetails as an additional argument.
2. This details argument will be passed all the way to the ChromeClient where it can be accessed if needed.
Comment 1 Mark Lam 2013-01-07 20:13:56 PST
Created attachment 181629 [details]
Fix.
Comment 2 Peter Beverloo (cr-android ews) 2013-01-07 20:30:10 PST
Comment on attachment 181629 [details]
Fix.

Attachment 181629 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/15756014
Comment 3 Build Bot 2013-01-07 20:41:28 PST
Comment on attachment 181629 [details]
Fix.

Attachment 181629 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15738981
Comment 4 Mark Lam 2013-01-07 20:48:14 PST
Created attachment 181630 [details]
Fix.  Resolves chromium and windows build breakage.
Comment 5 Mark Lam 2013-01-07 21:53:39 PST
The bots are happy.  Time to get a review.
Comment 6 Mark Lam 2013-01-07 21:54:21 PST
Comment on attachment 181630 [details]
Fix.  Resolves chromium and windows build breakage.

I meant r? not r+.  Need a review.
Comment 7 Mark Lam 2013-01-08 10:49:42 PST
Landed in r139078: <http://trac.webkit.org/changeset/139078>.