Modified: trunk/Source/WebCore/ChangeLog (162788 => 162789)
--- trunk/Source/WebCore/ChangeLog 2014-01-26 00:44:46 UTC (rev 162788)
+++ trunk/Source/WebCore/ChangeLog 2014-01-26 00:50:21 UTC (rev 162789)
@@ -1,5 +1,20 @@
2014-01-25 Sam Weinig <s...@webkit.org>
+ Remove more unnecessary #if PLATFORM(IOS)s in ApplicationCacheStorage.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=127635
+
+ Reviewed by Antti Koivisto.
+
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::executeSQLCommand):
+ (WebCore::ApplicationCacheStorage::verifySchemaVersion):
+ (WebCore::ApplicationCacheStorage::executeStatement):
+ (WebCore::ApplicationCacheStorage::store):
+ (WebCore::ApplicationCacheStorage::ensureOriginRecord):
+ (WebCore::ApplicationCacheStorage::loadCache):
+
+2014-01-25 Sam Weinig <s...@webkit.org>
+
Remove some iOS #ifdefs by adding SQLiteDatabaseTracker to all the builds
https://bugs.webkit.org/show_bug.cgi?id=127632
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (162788 => 162789)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2014-01-26 00:44:46 UTC (rev 162788)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2014-01-26 00:50:21 UTC (rev 162789)
@@ -566,9 +566,7 @@
bool ApplicationCacheStorage::executeSQLCommand(const String& sql)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
ASSERT(m_database.isOpen());
bool result = m_database.executeCommand(sql);
@@ -586,9 +584,8 @@
void ApplicationCacheStorage::verifySchemaVersion()
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
+
int version = SQLiteStatement(m_database, "PRAGMA user_version").getColumnInt(0);
if (version == schemaVersion)
return;
@@ -682,9 +679,7 @@
bool ApplicationCacheStorage::executeStatement(SQLiteStatement& statement)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
bool result = statement.executeCommand();
if (!result)
LOG_ERROR("Application Cache Storage: failed to execute statement \"%s\" error \"%s\"",
@@ -695,9 +690,7 @@
bool ApplicationCacheStorage::store(ApplicationCacheGroup* group, GroupStorageIDJournal* journal)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
ASSERT(group->storageID() == 0);
ASSERT(journal);
@@ -724,9 +717,7 @@
bool ApplicationCacheStorage::store(ApplicationCache* cache, ResourceStorageIDJournal* storageIDJournal)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
ASSERT(cache->storageID() == 0);
ASSERT(cache->group()->storageID() != 0);
ASSERT(storageIDJournal);
@@ -808,9 +799,7 @@
bool ApplicationCacheStorage::store(ApplicationCacheResource* resource, unsigned cacheStorageID)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
ASSERT(cacheStorageID);
ASSERT(!resource->storageID());
@@ -983,9 +972,7 @@
bool ApplicationCacheStorage::ensureOriginRecord(const SecurityOrigin* origin)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
SQLiteStatement insertOriginStatement(m_database, "INSERT INTO Origins (origin, quota) VALUES (?, ?)");
if (insertOriginStatement.prepare() != SQLResultOk)
return false;
@@ -1133,10 +1120,8 @@
PassRefPtr<ApplicationCache> ApplicationCacheStorage::loadCache(unsigned storageID)
{
-#if PLATFORM(IOS)
ASSERT(SQLiteDatabaseTracker::hasTransactionInProgress());
-#endif
- SQLiteStatement cacheStatement(m_database,
+ SQLiteStatement cacheStatement(m_database,
"SELECT url, statusCode, type, mimeType, textEncodingName, headers, CacheResourceData.data, CacheResourceData.path FROM CacheEntries INNER JOIN CacheResources ON CacheEntries.resource=CacheResources.id "
"INNER JOIN CacheResourceData ON CacheResourceData.id=CacheResources.data WHERE CacheEntries.cache=?");
if (cacheStatement.prepare() != SQLResultOk) {