Add a WebKit1 database provider
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jan 2015 17:53:29 +0000 (17:53 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jan 2015 17:53:29 +0000 (17:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140126

Reviewed by Sam Weinig.

Source/WebCore:

Use a Ref instead of a RefPtr since the database provider can never be null now.

* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::indexedDB):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::databaseProvider):

Source/WebKit:

Add a stubbed out database provider.

* Storage/WebDatabaseProvider.cpp: Added.
(WebDatabaseProvider::shared):
(WebDatabaseProvider::WebDatabaseProvider):
(WebDatabaseProvider::~WebDatabaseProvider):
(WebDatabaseProvider::createIDBFactoryBackend):
* Storage/WebDatabaseProvider.h: Added.
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Set the database provider.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Set the database provider.

* WebView.cpp:
(WebView::initWithFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebKit/ChangeLog
Source/WebKit/Storage/WebDatabaseProvider.cpp [new file with mode: 0644]
Source/WebKit/Storage/WebDatabaseProvider.h [new file with mode: 0644]
Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj
Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp

index d5942bda8a7e9a3f64572248624a30899331b63a..3988d55facfcda2199ffdbe0f61632ed8e4d5b6f 100644 (file)
@@ -1,3 +1,19 @@
+2015-01-06  Anders Carlsson  <andersca@apple.com>
+
+        Add a WebKit1 database provider
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+
+        Reviewed by Sam Weinig.
+
+        Use a Ref instead of a RefPtr since the database provider can never be null now.
+
+        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
+        (WebCore::DOMWindowIndexedDatabase::indexedDB):
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        * page/Page.h:
+        (WebCore::Page::databaseProvider):
+
 2015-01-06  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed build fix after r177952.
index b8a47b2ae0556f90d7a8d9c4cb8f1e4015f7ba6b..33243741b3c80313879bcb61fb1da5afbb6a412e 100644 (file)
@@ -103,19 +103,17 @@ IDBFactory* DOMWindowIndexedDatabase::indexedDB()
 {
     Document* document = m_window->document();
     if (!document)
-        return 0;
+        return nullptr;
 
     Page* page = document->page();
     if (!page)
-        return 0;
+        return nullptr;
 
     if (!m_window->isCurrentlyDisplayedInFrame())
-        return 0;
+        return nullptr;
 
-    if (!m_idbFactory) {
-        if (DatabaseProvider* databaseProvider = page->databaseProvider())
-            m_idbFactory = IDBFactory::create(databaseProvider->idbFactoryBackend());
-    }
+    if (!m_idbFactory)
+        m_idbFactory = IDBFactory::create(page->databaseProvider().idbFactoryBackend());
 
     return m_idbFactory.get();
 }
index 451316926dcaa028657494d05f53e56e1b828296..4288fb6c457e09fd46d170593afd9595ef014d6d 100644 (file)
@@ -204,7 +204,7 @@ Page::Page(PageConfiguration& pageConfiguration)
 #endif
     , m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
     , m_framesHandlingBeforeUnloadEvent(0)
-    , m_databaseProvider(WTF::move(pageConfiguration.databaseProvider))
+    , m_databaseProvider(*WTF::move(pageConfiguration.databaseProvider))
     , m_storageNamespaceProvider(*WTF::move(pageConfiguration.storageNamespaceProvider))
     , m_userContentController(WTF::move(pageConfiguration.userContentController))
     , m_visitedLinkStore(*WTF::move(pageConfiguration.visitedLinkStore))
index 550a1fa3f6e94955a60a3f283867617d0342110e..599327a55e4db2b4f5ae58133b1d6b780f18b40a 100644 (file)
@@ -403,7 +403,7 @@ public:
     void setLastSpatialNavigationCandidateCount(unsigned count) { m_lastSpatialNavigationCandidatesCount = count; }
     unsigned lastSpatialNavigationCandidateCount() const { return m_lastSpatialNavigationCandidatesCount; }
 
-    DatabaseProvider* databaseProvider() { return m_databaseProvider.get(); }
+    DatabaseProvider& databaseProvider() { return m_databaseProvider; }
 
     StorageNamespaceProvider& storageNamespaceProvider() { return m_storageNamespaceProvider.get(); }
     void setStorageNamespaceProvider(Ref<StorageNamespaceProvider>&&);
@@ -576,7 +576,7 @@ private:
     unsigned m_lastSpatialNavigationCandidatesCount;
     unsigned m_framesHandlingBeforeUnloadEvent;
 
-    RefPtr<DatabaseProvider> m_databaseProvider;
+    Ref<DatabaseProvider> m_databaseProvider;
     Ref<StorageNamespaceProvider> m_storageNamespaceProvider;
     RefPtr<UserContentController> m_userContentController;
     Ref<VisitedLinkStore> m_visitedLinkStore;
index 761ab8cf76d7ba924c952114a036393a4a61eccb..908953caf2e437d862893c6485490f38325471ff 100644 (file)
@@ -1,3 +1,22 @@
+2015-01-06  Anders Carlsson  <andersca@apple.com>
+
+        Add a WebKit1 database provider
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+
+        Reviewed by Sam Weinig.
+
+        Add a stubbed out database provider.
+
+        * Storage/WebDatabaseProvider.cpp: Added.
+        (WebDatabaseProvider::shared):
+        (WebDatabaseProvider::WebDatabaseProvider):
+        (WebDatabaseProvider::~WebDatabaseProvider):
+        (WebDatabaseProvider::createIDBFactoryBackend):
+        * Storage/WebDatabaseProvider.h: Added.
+        * WebKit.vcxproj/WebKit/WebKit.vcxproj:
+        * WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2015-01-05  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed build fix after r177925.
diff --git a/Source/WebKit/Storage/WebDatabaseProvider.cpp b/Source/WebKit/Storage/WebDatabaseProvider.cpp
new file mode 100644 (file)
index 0000000..edebd2b
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "WebDatabaseProvider.h"
+
+#include <WebCore/IDBFactoryBackendInterface.h>
+
+WebDatabaseProvider& WebDatabaseProvider::shared()
+{
+    static WebDatabaseProvider& databaseProvider = adoptRef(*new WebDatabaseProvider).leakRef();
+
+    return databaseProvider;
+}
+
+WebDatabaseProvider::WebDatabaseProvider()
+{
+}
+
+WebDatabaseProvider::~WebDatabaseProvider()
+{
+}
+
+#if ENABLE(INDEXED_DATABASE)
+RefPtr<WebCore::IDBFactoryBackendInterface> WebDatabaseProvider::createIDBFactoryBackend()
+{
+    return nullptr;
+}
+#endif
diff --git a/Source/WebKit/Storage/WebDatabaseProvider.h b/Source/WebKit/Storage/WebDatabaseProvider.h
new file mode 100644 (file)
index 0000000..824434c
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebDatabaseProvider_h
+#define WebDatabaseProvider_h
+
+#include <WebCore/DatabaseProvider.h>
+
+class WebDatabaseProvider final : public WebCore::DatabaseProvider {
+public:
+    static WebDatabaseProvider& shared();
+    virtual ~WebDatabaseProvider();
+
+private:
+    explicit WebDatabaseProvider();
+
+#if ENABLE(INDEXED_DATABASE)
+    virtual RefPtr<WebCore::IDBFactoryBackendInterface> createIDBFactoryBackend() override;
+#endif
+};
+
+#endif // WebDatabaseProvider_h
index fc56a994f2d1317acbca43e9dfdfbd28001f607d..ff750bc3a3a2925051f1846558c108f6a3c08df8 100644 (file)
     <ClCompile Include="..\..\Storage\StorageSyncManager.cpp" />
     <ClCompile Include="..\..\Storage\StorageThread.cpp" />
     <ClCompile Include="..\..\Storage\StorageTracker.cpp" />
+    <ClCompile Include="..\..\Storage\WebDatabaseProvider.cpp" />
     <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.cpp" />
     <ClCompile Include="..\..\cf\WebCoreSupport\WebInspectorClientCF.cpp" />
     <ClCompile Include="..\..\win\AccessibleBase.cpp" />
     <ClInclude Include="..\..\Storage\StorageThread.h" />
     <ClInclude Include="..\..\Storage\StorageTracker.h" />
     <ClInclude Include="..\..\Storage\StorageTrackerClient.h" />
+    <ClInclude Include="..\..\Storage\WebDatabaseProvider.h" />
     <ClInclude Include="..\..\Storage\WebStorageNamespaceProvider.h" />
     <ClInclude Include="..\..\win\AccessibleBase.h" />
     <ClInclude Include="..\..\win\AccessibleDocument.h" />
index 12dd953f036df5257fb0c74364ba1349cb793d40..094f60a9b19117e3d18fe5e7b9c950678e28c434 100644 (file)
     <ClCompile Include="..\..\Storage\StorageTracker.cpp">
       <Filter>Sources</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\Storage\WebDatabaseProvider.cpp">
+      <Filter>Sources</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\Storage\WebStorageNamespaceProvider.cpp">
       <Filter>Sources</Filter>
     </ClCompile>
     <ClInclude Include="..\..\Storage\StorageTrackerClient.h">
       <Filter>Sources</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\Storage\WebDatabaseProvider.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\Storage\WebStorageNamespaceProvider.h">
       <Filter>Header Files</Filter>
     </ClInclude>
index 91680bb8c667773682e82484f258e77ef3d2d31e..efaa9c386ac107c2c7e481c278c9fa22e0ef9a91 100644 (file)
@@ -52,6 +52,8 @@
                1A77B02F0EE7730500C8A1F9 /* WebPluginRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */; };
                1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */; };
                1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */; };
+               1AA83F831A5C4AE400026EC6 /* WebDatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */; };
+               1AA83F841A5C4AE400026EC6 /* WebDatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */; };
                1AA879B611CBE9BF003C664F /* WebPlatformStrategies.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */; };
                1AA879B711CBE9BF003C664F /* WebPlatformStrategies.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA879B511CBE9BF003C664F /* WebPlatformStrategies.mm */; };
                1AAF58940EDCCF15008D883D /* WebKitPluginAgent.defs in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF588A0EDCCEA3008D883D /* WebKitPluginAgent.defs */; settings = {ATTRIBUTES = (Private, ); }; };
                1A77B02D0EE7730500C8A1F9 /* WebPluginRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebPluginRequest.m; sourceTree = "<group>"; };
                1A8DED4E0EE88B8A00F25022 /* HostedNetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostedNetscapePluginStream.h; sourceTree = "<group>"; };
                1A8DED4F0EE88B8A00F25022 /* HostedNetscapePluginStream.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HostedNetscapePluginStream.mm; sourceTree = "<group>"; };
+               1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebDatabaseProvider.cpp; path = ../../Storage/WebDatabaseProvider.cpp; sourceTree = "<group>"; };
+               1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebDatabaseProvider.h; path = ../../Storage/WebDatabaseProvider.h; sourceTree = "<group>"; };
                1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPlatformStrategies.h; sourceTree = "<group>"; };
                1AA879B511CBE9BF003C664F /* WebPlatformStrategies.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPlatformStrategies.mm; sourceTree = "<group>"; };
                1AAF588A0EDCCEA3008D883D /* WebKitPluginAgent.defs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.mig; path = WebKitPluginAgent.defs; sourceTree = "<group>"; };
                                511F3FD40CECC88F00852565 /* WebDatabaseManagerClient.mm */,
                                51AEDEF00CECF45700854328 /* WebDatabaseManagerInternal.h */,
                                511F3FD20CECC88F00852565 /* WebDatabaseManagerPrivate.h */,
+                               1AA83F811A5C4AE400026EC6 /* WebDatabaseProvider.cpp */,
+                               1AA83F821A5C4AE400026EC6 /* WebDatabaseProvider.h */,
                                A5DEFC0D11D5343E00885273 /* WebDatabaseQuotaManager.h */,
                                A5DEFC0E11D5343E00885273 /* WebDatabaseQuotaManager.mm */,
                                1A591D431A2E91BB000907C4 /* WebStorageNamespaceProvider.cpp */,
                                5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */,
                                06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */,
                                B804176F1217A83100466BAE /* WebInspectorFrontend.h in Headers */,
+                               1AA83F841A5C4AE400026EC6 /* WebDatabaseProvider.h in Headers */,
                                7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */,
                                939810420824BF01008DF038 /* WebJavaScriptTextInputPanel.h in Headers */,
                                37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */,
                                65E0F88508500917007E5CB9 /* WebNSURLRequestExtras.m in Sources */,
                                65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.mm in Sources */,
                                939810C90824BF01008DF038 /* WebNSViewExtras.m in Sources */,
+                               1AA83F831A5C4AE400026EC6 /* WebDatabaseProvider.cpp in Sources */,
                                939810CA0824BF01008DF038 /* WebNSWindowExtras.m in Sources */,
                                A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
                                939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */,
index 6cbea37971768d5be340f23c3db1d80dadb7e82b..d24314c8352ad8191c1e12c2489ca1f71706c70f 100644 (file)
@@ -1,3 +1,15 @@
+2015-01-06  Anders Carlsson  <andersca@apple.com>
+
+        Add a WebKit1 database provider
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+
+        Reviewed by Sam Weinig.
+
+        Set the database provider.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+
 2015-01-01  Jeff Miller  <jeffm@apple.com>
 
         Update user-visible copyright strings to include 2015
index 00cc36d777e868aa4cd5e5bd5bce833c20d495af..cf13ecabffb59794fbb5752b197c52d033ce9bb0 100644 (file)
@@ -46,6 +46,7 @@
 #import "WebDOMOperationsPrivate.h"
 #import "WebDataSourceInternal.h"
 #import "WebDatabaseManagerPrivate.h"
+#import "WebDatabaseProvider.h"
 #import "WebDefaultEditingDelegate.h"
 #import "WebDefaultPolicyDelegate.h"
 #import "WebDefaultUIDelegate.h"
@@ -966,6 +967,7 @@ static void WebKitInitializeGamepadProviderIfNecessary()
     pageConfiguration.alternativeTextClient = new WebAlternativeTextClient(self);
     pageConfiguration.loaderClientForMainFrame = new WebFrameLoaderClient;
     pageConfiguration.progressTrackerClient = new WebProgressTrackerClient(self);
+    pageConfiguration.databaseProvider = &WebDatabaseProvider::shared();
     pageConfiguration.storageNamespaceProvider = &_private->group->storageNamespaceProvider();
     pageConfiguration.userContentController = &_private->group->userContentController();
     pageConfiguration.visitedLinkStore = &_private->group->visitedLinkStore();
index df9f85d984ef987d29625a5e402ac53748e5854c..63a5cc6894f86e47f1be8b8b9bc0c868019b67ae 100644 (file)
@@ -1,3 +1,15 @@
+2015-01-06  Anders Carlsson  <andersca@apple.com>
+
+        Add a WebKit1 database provider
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+
+        Reviewed by Sam Weinig.
+
+        Set the database provider.
+
+        * WebView.cpp:
+        (WebView::initWithFrame):
+
 2014-12-29  Anders Carlsson  <andersca@apple.com>
 
         Another attempt at fixing the build.
index d93b9b3684d17c42c92582552ead5032695aa320..a675bfaf3be763067218082d1091d25a9b5068ec 100644 (file)
@@ -41,6 +41,7 @@
 #include "WebContextMenuClient.h"
 #include "WebCoreTextRenderer.h"
 #include "WebDatabaseManager.h"
+#include "WebDatabaseProvider.h"
 #include "WebDocumentLoader.h"
 #include "WebDownload.h"
 #include "WebDragClient.h"
@@ -2812,6 +2813,7 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
     configuration.inspectorClient = m_inspectorClient;
 #endif // ENABLE(INSPECTOR)
     configuration.loaderClientForMainFrame = new WebFrameLoaderClient;
+    configuration.databaseProvider = &WebDatabaseProvider::shared();
     configuration.storageNamespaceProvider = WebStorageNamespaceProvider::create(localStorageDatabasePath(m_preferences.get()));
     configuration.progressTrackerClient = static_cast<WebFrameLoaderClient*>(configuration.loaderClientForMainFrame);
     configuration.visitedLinkStore = &WebVisitedLinkStore::shared();