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.
Created attachment 75767 [details] Patch
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 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.
(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 on attachment 75767 [details] Patch Committed in r73449 http://trac.webkit.org/changeset/73449