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

Jessie Berlin
Reported 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.
Attachments
Patch (16.02 KB, patch)
2010-12-06 18:04 PST, Jessie Berlin
no flags
Jessie Berlin
Comment 1 2010-12-06 18:04:06 PST
WebKit Review Bot
Comment 2 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.
Darin Adler
Comment 3 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.
Jessie Berlin
Comment 4 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!
Jessie Berlin
Comment 5 2010-12-07 09:29:53 PST
Note You need to log in before you can comment on or make changes to this bug.