Unreviewed, rolling out r177963.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jan 2015 19:43:33 +0000 (19:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jan 2015 19:43:33 +0000 (19:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140136

Caused lots of crashes (Requested by smfr on #webkit).

Reverted changeset:

"Add a WebKit1 database provider"
https://bugs.webkit.org/show_bug.cgi?id=140126
http://trac.webkit.org/changeset/177963

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177983 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 [deleted file]
Source/WebKit/Storage/WebDatabaseProvider.h [deleted file]
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 1cee979833b8b8daea270c176853cd5bd108be50..d6d65b71c394e864701272d11f9ff86e80af08bf 100644 (file)
@@ -1,3 +1,16 @@
+2015-01-06  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r177963.
+        https://bugs.webkit.org/show_bug.cgi?id=140136
+
+        Caused lots of crashes (Requested by smfr on #webkit).
+
+        Reverted changeset:
+
+        "Add a WebKit1 database provider"
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+        http://trac.webkit.org/changeset/177963
+
 2015-01-06  Antti Koivisto  <antti@apple.com>
 
         REGRESSION (r177876): 35% regression in Parser/html5-full-render
index 2a1ae3cf5c1d63d319898e4bc7f16418dcdf95af..4b4b09b76d3c3261eb4687e3600098802ac47dfb 100644 (file)
@@ -102,17 +102,19 @@ IDBFactory* DOMWindowIndexedDatabase::indexedDB()
 {
     Document* document = m_window->document();
     if (!document)
-        return nullptr;
+        return 0;
 
     Page* page = document->page();
     if (!page)
-        return nullptr;
+        return 0;
 
     if (!m_window->isCurrentlyDisplayedInFrame())
-        return nullptr;
+        return 0;
 
-    if (!m_idbFactory)
-        m_idbFactory = IDBFactory::create(page->databaseProvider().idbFactoryBackend());
+    if (!m_idbFactory) {
+        if (DatabaseProvider* databaseProvider = page->databaseProvider())
+            m_idbFactory = IDBFactory::create(databaseProvider->idbFactoryBackend());
+    }
 
     return m_idbFactory.get();
 }
index 4288fb6c457e09fd46d170593afd9595ef014d6d..451316926dcaa028657494d05f53e56e1b828296 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 599327a55e4db2b4f5ae58133b1d6b780f18b40a..550a1fa3f6e94955a60a3f283867617d0342110e 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; }
+    DatabaseProvider* databaseProvider() { return m_databaseProvider.get(); }
 
     StorageNamespaceProvider& storageNamespaceProvider() { return m_storageNamespaceProvider.get(); }
     void setStorageNamespaceProvider(Ref<StorageNamespaceProvider>&&);
@@ -576,7 +576,7 @@ private:
     unsigned m_lastSpatialNavigationCandidatesCount;
     unsigned m_framesHandlingBeforeUnloadEvent;
 
-    Ref<DatabaseProvider> m_databaseProvider;
+    RefPtr<DatabaseProvider> m_databaseProvider;
     Ref<StorageNamespaceProvider> m_storageNamespaceProvider;
     RefPtr<UserContentController> m_userContentController;
     Ref<VisitedLinkStore> m_visitedLinkStore;
index 908953caf2e437d862893c6485490f38325471ff..7d1dfdf483b29d88d033f8f077c4372280b9f6cf 100644 (file)
@@ -1,3 +1,16 @@
+2015-01-06  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r177963.
+        https://bugs.webkit.org/show_bug.cgi?id=140136
+
+        Caused lots of crashes (Requested by smfr on #webkit).
+
+        Reverted changeset:
+
+        "Add a WebKit1 database provider"
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+        http://trac.webkit.org/changeset/177963
+
 2015-01-06  Anders Carlsson  <andersca@apple.com>
 
         Add a WebKit1 database provider
diff --git a/Source/WebKit/Storage/WebDatabaseProvider.cpp b/Source/WebKit/Storage/WebDatabaseProvider.cpp
deleted file mode 100644 (file)
index edebd2b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
deleted file mode 100644 (file)
index 824434c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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 ff750bc3a3a2925051f1846558c108f6a3c08df8..fc56a994f2d1317acbca43e9dfdfbd28001f607d 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 094f60a9b19117e3d18fe5e7b9c950678e28c434..12dd953f036df5257fb0c74364ba1349cb793d40 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 efaa9c386ac107c2c7e481c278c9fa22e0ef9a91..91680bb8c667773682e82484f258e77ef3d2d31e 100644 (file)
@@ -52,8 +52,6 @@
                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 d24314c8352ad8191c1e12c2489ca1f71706c70f..4310b05eda03cb60c13a4905029f88ce06ef3eb8 100644 (file)
@@ -1,3 +1,16 @@
+2015-01-06  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r177963.
+        https://bugs.webkit.org/show_bug.cgi?id=140136
+
+        Caused lots of crashes (Requested by smfr on #webkit).
+
+        Reverted changeset:
+
+        "Add a WebKit1 database provider"
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+        http://trac.webkit.org/changeset/177963
+
 2015-01-06  Anders Carlsson  <andersca@apple.com>
 
         Add a WebKit1 database provider
index cf13ecabffb59794fbb5752b197c52d033ce9bb0..00cc36d777e868aa4cd5e5bd5bce833c20d495af 100644 (file)
@@ -46,7 +46,6 @@
 #import "WebDOMOperationsPrivate.h"
 #import "WebDataSourceInternal.h"
 #import "WebDatabaseManagerPrivate.h"
-#import "WebDatabaseProvider.h"
 #import "WebDefaultEditingDelegate.h"
 #import "WebDefaultPolicyDelegate.h"
 #import "WebDefaultUIDelegate.h"
@@ -967,7 +966,6 @@ 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 63a5cc6894f86e47f1be8b8b9bc0c868019b67ae..09fcfe7daac021f2d94424d2ac1e6ca049cd39a6 100644 (file)
@@ -1,3 +1,16 @@
+2015-01-06  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r177963.
+        https://bugs.webkit.org/show_bug.cgi?id=140136
+
+        Caused lots of crashes (Requested by smfr on #webkit).
+
+        Reverted changeset:
+
+        "Add a WebKit1 database provider"
+        https://bugs.webkit.org/show_bug.cgi?id=140126
+        http://trac.webkit.org/changeset/177963
+
 2015-01-06  Anders Carlsson  <andersca@apple.com>
 
         Add a WebKit1 database provider
index a675bfaf3be763067218082d1091d25a9b5068ec..d93b9b3684d17c42c92582552ead5032695aa320 100644 (file)
@@ -41,7 +41,6 @@
 #include "WebContextMenuClient.h"
 #include "WebCoreTextRenderer.h"
 #include "WebDatabaseManager.h"
-#include "WebDatabaseProvider.h"
 #include "WebDocumentLoader.h"
 #include "WebDownload.h"
 #include "WebDragClient.h"
@@ -2813,7 +2812,6 @@ 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();