Bug 50604

Summary: WebKit2: Need to set the location of the Databases directory when the WebProcess is initialized
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: WebKit2Assignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, jberlin, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

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