Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (188060 => 188061)
--- trunk/Source/WebCore/CMakeLists.txt 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/CMakeLists.txt 2015-08-06 21:23:55 UTC (rev 188061)
@@ -1003,7 +1003,6 @@
Modules/webdatabase/DOMWindowWebDatabase.cpp
Modules/webdatabase/Database.cpp
Modules/webdatabase/DatabaseAuthorizer.cpp
- Modules/webdatabase/DatabaseBackendBase.cpp
Modules/webdatabase/DatabaseContext.cpp
Modules/webdatabase/DatabaseManager.cpp
Modules/webdatabase/DatabaseServer.cpp
Modified: trunk/Source/WebCore/ChangeLog (188060 => 188061)
--- trunk/Source/WebCore/ChangeLog 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/ChangeLog 2015-08-06 21:23:55 UTC (rev 188061)
@@ -1,3 +1,27 @@
+2015-08-06 Anders Carlsson <ander...@apple.com>
+
+ Get rid of DatabaseBackendBase
+ https://bugs.webkit.org/show_bug.cgi?id=147733
+
+ Reviewed by Geoffrey Garen.
+
+ * CMakeLists.txt:
+ * Modules/webdatabase/Database.cpp:
+ (WebCore::Database::Database):
+ (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
+ (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
+ * Modules/webdatabase/Database.h:
+ * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
+ (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
+ (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
+ * Modules/webdatabase/DatabaseBackendBase.h: Removed.
+ * Modules/webdatabase/DatabaseManager.cpp:
+ * Modules/webdatabase/DatabaseManager.h:
+ * Modules/webdatabase/DatabaseTracker.cpp:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+
2015-08-06 Myles C. Maxfield <mmaxfi...@apple.com>
Add comment to CSSParserString
Modified: trunk/Source/WebCore/Modules/webdatabase/Database.cpp (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/Database.cpp 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.cpp 2015-08-06 21:23:55 UTC (rev 188061)
@@ -189,7 +189,7 @@
guidToVersionMap().set(guid, newVersion.isEmpty() ? String() : newVersion.isolatedCopy());
}
-typedef HashMap<DatabaseGuid, std::unique_ptr<HashSet<DatabaseBackendBase*>>> GuidDatabaseMap;
+typedef HashMap<DatabaseGuid, std::unique_ptr<HashSet<Database*>>> GuidDatabaseMap;
static GuidDatabaseMap& guidToDatabaseMap()
{
@@ -236,9 +236,9 @@
std::lock_guard<std::mutex> locker(guidMutex());
m_guid = guidForOriginAndName(securityOrigin()->toString(), name);
- std::unique_ptr<HashSet<DatabaseBackendBase*>>& hashSet = guidToDatabaseMap().add(m_guid, nullptr).iterator->value;
+ std::unique_ptr<HashSet<Database*>>& hashSet = guidToDatabaseMap().add(m_guid, nullptr).iterator->value;
if (!hashSet)
- hashSet = std::make_unique<HashSet<DatabaseBackendBase*>>();
+ hashSet = std::make_unique<HashSet<Database*>>();
hashSet->add(this);
}
@@ -324,20 +324,20 @@
class DoneCreatingDatabaseOnExitCaller {
public:
- DoneCreatingDatabaseOnExitCaller(DatabaseBackendBase* database)
+ DoneCreatingDatabaseOnExitCaller(Database* database)
: m_database(database)
, m_openSucceeded(false)
{
}
~DoneCreatingDatabaseOnExitCaller()
{
- DatabaseTracker::tracker().doneCreatingDatabase(static_cast<Database*>(m_database));
+ DatabaseTracker::tracker().doneCreatingDatabase(m_database);
}
void setOpenSucceeded() { m_openSucceeded = true; }
private:
- DatabaseBackendBase* m_database;
+ Database* m_database;
bool m_openSucceeded;
};
Modified: trunk/Source/WebCore/Modules/webdatabase/Database.h (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/Database.h 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.h 2015-08-06 21:23:55 UTC (rev 188061)
@@ -29,9 +29,9 @@
#ifndef Database_h
#define Database_h
-#include "DatabaseBackendBase.h"
#include "DatabaseBasicTypes.h"
#include "DatabaseError.h"
+#include "SQLiteDatabase.h"
#include <wtf/Deque.h>
#include <wtf/text/WTFString.h>
@@ -39,6 +39,7 @@
class ChangeVersionData;
class DatabaseCallback;
+class DatabaseDetails;
class DatabaseContext;
class ScriptExecutionContext;
class SecurityOrigin;
@@ -50,7 +51,7 @@
class SQLTransactionErrorCallback;
class VoidCallback;
-class Database final : public DatabaseBackendBase {
+class Database final : public ThreadSafeRefCounted<Database> {
public:
virtual ~Database();
@@ -166,7 +167,6 @@
bool m_isTransactionQueueEnabled;
friend class ChangeVersionWrapper;
- friend class DatabaseBackendBase;
friend class DatabaseManager;
friend class DatabaseServer; // FIXME: remove this when the backend has been split out.
friend class SQLStatement;
Deleted: trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp 2015-08-06 21:23:55 UTC (rev 188061)
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2013 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.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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 "config.h"
-#include "DatabaseBackendBase.h"
-
-#include "Database.h"
-#include "DatabaseAuthorizer.h"
-#include "DatabaseContext.h"
-#include "DatabaseManager.h"
-#include "DatabaseTracker.h"
-#include "ExceptionCode.h"
-#include "Logging.h"
-#include "SQLiteDatabaseTracker.h"
-#include "SQLiteStatement.h"
-#include "SecurityOrigin.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/NeverDestroyed.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/StringHash.h>
-
-namespace WebCore {
-
-DatabaseBackendBase::DatabaseBackendBase()
-{
-}
-
-DatabaseBackendBase::~DatabaseBackendBase()
-{
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.h (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.h 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseBackendBase.h 2015-08-06 21:23:55 UTC (rev 188061)
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2013 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.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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 DatabaseBackendBase_h
-#define DatabaseBackendBase_h
-
-#include "DatabaseBasicTypes.h"
-#include "DatabaseDetails.h"
-#include "DatabaseError.h"
-#include "SQLiteDatabase.h"
-#include <wtf/Forward.h>
-#include <wtf/RefPtr.h>
-#include <wtf/ThreadSafeRefCounted.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class Database;
-class DatabaseAuthorizer;
-class DatabaseContext;
-class SecurityOrigin;
-
-class DatabaseBackendBase : public ThreadSafeRefCounted<DatabaseBackendBase> {
-public:
- virtual ~DatabaseBackendBase();
-
-
-protected:
- friend class ChangeVersionWrapper;
- friend class SQLStatementBackend;
- friend class SQLStatementSync;
- friend class SQLTransactionBackend;
- friend class SQLTransactionBackendSync;
-
- DatabaseBackendBase();
-
- friend class DatabaseServer;
-};
-
-} // namespace WebCore
-
-#endif // DatabaseBackendBase_h
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp 2015-08-06 21:23:55 UTC (rev 188061)
@@ -28,7 +28,6 @@
#include "AbstractDatabaseServer.h"
#include "Database.h"
-#include "DatabaseBackendBase.h"
#include "DatabaseCallback.h"
#include "DatabaseContext.h"
#include "DatabaseServer.h"
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.h (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.h 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.h 2015-08-06 21:23:55 UTC (rev 188061)
@@ -40,7 +40,6 @@
class AbstractDatabaseServer;
class Database;
-class DatabaseBackendBase;
class DatabaseCallback;
class DatabaseContext;
class DatabaseManagerClient;
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (188060 => 188061)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2015-08-06 21:23:55 UTC (rev 188061)
@@ -32,7 +32,6 @@
#include "Chrome.h"
#include "ChromeClient.h"
#include "Database.h"
-#include "DatabaseBackendBase.h"
#include "DatabaseContext.h"
#include "DatabaseManager.h"
#include "DatabaseManagerClient.h"
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (188060 => 188061)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2015-08-06 21:23:55 UTC (rev 188061)
@@ -6808,7 +6808,6 @@
<ClCompile Include="..\Modules\webdatabase\ChangeVersionWrapper.cpp" />
<ClCompile Include="..\Modules\webdatabase\Database.cpp" />
<ClCompile Include="..\Modules\webdatabase\DatabaseAuthorizer.cpp" />
- <ClCompile Include="..\Modules\webdatabase\DatabaseBackendBase.cpp" />
<ClCompile Include="..\Modules\webdatabase\DatabaseContext.cpp" />
<ClCompile Include="..\Modules\webdatabase\DatabaseManager.cpp" />
<ClCompile Include="..\Modules\webdatabase\DatabaseServer.cpp" />
@@ -20547,7 +20546,6 @@
<ClInclude Include="..\Modules\webdatabase\ChangeVersionWrapper.h" />
<ClInclude Include="..\Modules\webdatabase\Database.h" />
<ClInclude Include="..\Modules\webdatabase\DatabaseAuthorizer.h" />
- <ClInclude Include="..\Modules\webdatabase\DatabaseBackendBase.h" />
<ClInclude Include="..\Modules\webdatabase\DatabaseBasicTypes.h" />
<ClInclude Include="..\Modules\webdatabase\DatabaseCallback.h" />
<ClInclude Include="..\Modules\webdatabase\DatabaseContext.h" />
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (188060 => 188061)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2015-08-06 21:23:55 UTC (rev 188061)
@@ -483,9 +483,6 @@
<ClCompile Include="..\Modules\webdatabase\DatabaseAuthorizer.cpp">
<Filter>Modules\webdatabase</Filter>
</ClCompile>
- <ClCompile Include="..\Modules\webdatabase\DatabaseBackendBase.cpp">
- <Filter>Modules\webdatabase</Filter>
- </ClCompile>
<ClCompile Include="..\Modules\webdatabase\DatabaseContext.cpp">
<Filter>Modules\webdatabase</Filter>
</ClCompile>
@@ -7445,9 +7442,6 @@
<ClInclude Include="..\Modules\webdatabase\DatabaseAuthorizer.h">
<Filter>Modules\webdatabase</Filter>
</ClInclude>
- <ClInclude Include="..\Modules\webdatabase\DatabaseBackendBase.h">
- <Filter>Modules\webdatabase</Filter>
- </ClInclude>
<ClInclude Include="..\Modules\webdatabase\DatabaseBasicTypes.h">
<Filter>Modules\webdatabase</Filter>
</ClInclude>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (188060 => 188061)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-08-06 21:23:10 UTC (rev 188060)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-08-06 21:23:55 UTC (rev 188061)
@@ -3702,8 +3702,6 @@
97B38E27151C4271004622E9 /* DOMWindowNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = 97B38E24151C4264004622E9 /* DOMWindowNotifications.h */; };
97B38E28151C4273004622E9 /* DOMWindowNotifications.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97B38E23151C4264004622E9 /* DOMWindowNotifications.cpp */; };
97B8FFD116AE7F960038388D /* CharacterReferenceParserInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 97B8FFCF16AE7F920038388D /* CharacterReferenceParserInlines.h */; };
- 97BC69DA1505F076001B74AC /* DatabaseBackendBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97BC69D61505F076001B74AC /* DatabaseBackendBase.cpp */; };
- 97BC69DB1505F076001B74AC /* DatabaseBackendBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 97BC69D71505F076001B74AC /* DatabaseBackendBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
97BC69DC1505F076001B74AC /* ChangeVersionWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97BC69D81505F076001B74AC /* ChangeVersionWrapper.cpp */; };
97BC69DD1505F076001B74AC /* ChangeVersionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 97BC69D91505F076001B74AC /* ChangeVersionWrapper.h */; };
97BC6A201505F081001B74AC /* Database.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97BC69DE1505F081001B74AC /* Database.cpp */; };
@@ -11038,8 +11036,6 @@
97B38E24151C4264004622E9 /* DOMWindowNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowNotifications.h; sourceTree = "<group>"; };
97B38E25151C4264004622E9 /* DOMWindowNotifications.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMWindowNotifications.idl; sourceTree = "<group>"; };
97B8FFCF16AE7F920038388D /* CharacterReferenceParserInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterReferenceParserInlines.h; sourceTree = "<group>"; };
- 97BC69D61505F076001B74AC /* DatabaseBackendBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseBackendBase.cpp; sourceTree = "<group>"; };
- 97BC69D71505F076001B74AC /* DatabaseBackendBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseBackendBase.h; sourceTree = "<group>"; };
97BC69D81505F076001B74AC /* ChangeVersionWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChangeVersionWrapper.cpp; sourceTree = "<group>"; };
97BC69D91505F076001B74AC /* ChangeVersionWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChangeVersionWrapper.h; sourceTree = "<group>"; };
97BC69DE1505F081001B74AC /* Database.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Database.cpp; sourceTree = "<group>"; };
@@ -18779,8 +18775,6 @@
97BC69E01505F081001B74AC /* Database.idl */,
97BC69E11505F081001B74AC /* DatabaseAuthorizer.cpp */,
97BC69E21505F081001B74AC /* DatabaseAuthorizer.h */,
- 97BC69D61505F076001B74AC /* DatabaseBackendBase.cpp */,
- 97BC69D71505F076001B74AC /* DatabaseBackendBase.h */,
FE3371A0167C11D400EDB752 /* DatabaseBasicTypes.h */,
97BC69E31505F081001B74AC /* DatabaseCallback.h */,
97BC69E41505F081001B74AC /* DatabaseCallback.idl */,
@@ -24360,7 +24354,6 @@
26F756B01B3B65AC0005DD79 /* MutableRange.h in Headers */,
97BC6A211505F081001B74AC /* Database.h in Headers */,
97BC6A241505F081001B74AC /* DatabaseAuthorizer.h in Headers */,
- 97BC69DB1505F076001B74AC /* DatabaseBackendBase.h in Headers */,
FE3371A2167C11D400EDB752 /* DatabaseBasicTypes.h in Headers */,
97BC6A251505F081001B74AC /* DatabaseCallback.h in Headers */,
97BC6A281505F081001B74AC /* DatabaseContext.h in Headers */,
@@ -28117,7 +28110,6 @@
62CD32591157E57C0063B0A7 /* CustomEvent.cpp in Sources */,
97BC6A201505F081001B74AC /* Database.cpp in Sources */,
97BC6A231505F081001B74AC /* DatabaseAuthorizer.cpp in Sources */,
- 97BC69DA1505F076001B74AC /* DatabaseBackendBase.cpp in Sources */,
97BC6A271505F081001B74AC /* DatabaseContext.cpp in Sources */,
FE456F181677D74E005EDDF9 /* DatabaseManager.cpp in Sources */,
1ACB2B231A5733F400333392 /* DatabaseProvider.cpp in Sources */,