RESOLVED FIXED 140108
Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
https://bugs.webkit.org/show_bug.cgi?id=140108
Summary Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
Anders Carlsson
Reported 2015-01-05 17:36:48 PST
Add a DatabaseProvider subclass in WebKit2 and use it for IndexedDB
Attachments
Patch (19.49 KB, patch)
2015-01-05 17:40 PST, Anders Carlsson
darin: review+
Anders Carlsson
Comment 1 2015-01-05 17:40:45 PST
Darin Adler
Comment 2 2015-01-05 20:16:11 PST
Comment on attachment 244023 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244023&action=review > Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.cpp:44 > +RefPtr<WebDatabaseProvider> WebDatabaseProvider::getOrCreate(uint64_t identifier) Why not use Ref for the return value instead of RefPtr since it’s never null? > Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.cpp:50 > + RefPtr<WebDatabaseProvider> storageNamespaceProvider = adoptRef(new WebDatabaseProvider(identifier)); Why not use Ref for this instead of RefPtr since it’s never null? > Source/WebKit2/WebProcess/Databases/WebDatabaseProvider.h:42 > + RefPtr<WebCore::IDBFactoryBackendInterface> createIDBFactoryBackend() override; I think you should include "virtual" here.
Darin Adler
Comment 3 2015-01-05 20:16:34 PST
Comment on attachment 244023 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244023&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:375 > + pageConfiguration.databaseProvider = WebDatabaseProvider::getOrCreate(m_pageGroup->pageGroupID()); What guarantees this ID won’t be 0 or -1?
Anders Carlsson
Comment 4 2015-01-06 08:49:59 PST
(In reply to comment #3) > Comment on attachment 244023 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=244023&action=review > > > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:375 > > + pageConfiguration.databaseProvider = WebDatabaseProvider::getOrCreate(m_pageGroup->pageGroupID()); > > What guarantees this ID won’t be 0 or -1? The page group ID will never be null, it's decided by the UI process. (In the future, we won't use the page group ID for this but an ID representing the website data store). I'll make the Ref changes you suggested, thanks!
Anders Carlsson
Comment 5 2015-01-06 08:54:18 PST
Note You need to log in before you can comment on or make changes to this bug.