Bug 50604 - WebKit2: Need to set the location of the Databases directory when the WebProcess is initialized
Summary: WebKit2: Need to set the location of the Databases directory when the WebProc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jessie Berlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 17:30 PST by Jessie Berlin
Modified: 2010-12-07 09:30 PST (History)
4 users (show)

See Also:


Attachments
Patch (16.02 KB, patch)
2010-12-06 18:04 PST, Jessie Berlin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2010-12-06 17:30:18 PST
In WebKit1, this is done in WebKitInitializeDatabasesIfNecessary in WebDatabaseManager.cpp/WebDatabaseManager.mm which is called from WebView::initWithFrame/WebView::_commonInitializationWithFrameName.

Without this directory set, HTML5 Databases are effectively disabled.

In WebKit2, this should probably be done in a call from the constructor of the WebProcess to a WebKit2 version of the WebKit1 WebDatabasesManager so that it is set by the time the WebProcess has finished being created.
Comment 1 Jessie Berlin 2010-12-06 18:04:06 PST
Created attachment 75767 [details]
Patch
Comment 2 WebKit Review Bot 2010-12-06 18:12:03 PST
Attachment 75767 [details] did not pass style-queue:

Failed to run "[u'git', u'reset', u'--hard', u'HEAD']" exit_code: 128
error: Could not write new index file.
fatal: Could not reset index file to revision 'HEAD'.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2010-12-06 18:17:04 PST
Comment on attachment 75767 [details]
Patch

Seems OK. A bit inelegant that we have to call WebDatabaseManager::shared explicitly for its side effect, but it’s similar to our usual pattern for this sort of thing I suppose.
Comment 4 Jessie Berlin 2010-12-07 08:13:09 PST
(In reply to comment #3)
> (From update of attachment 75767 [details])
> Seems OK. A bit inelegant that we have to call WebDatabaseManager::shared explicitly for its side effect, but it’s similar to our usual pattern for this sort of thing I suppose.

I am not thrilled with it either, but decided at length that I like it better than the method used in WebKit1 (a standalone WebKitInitializeDatabasesIfNecessary function).

Thanks for the review!
Comment 5 Jessie Berlin 2010-12-07 09:29:53 PST
Comment on attachment 75767 [details]
Patch

Committed in r73449
http://trac.webkit.org/changeset/73449