summaryrefslogtreecommitdiffstats
path: root/WebCore/storage
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/storage')
-rw-r--r--WebCore/storage/DatabaseAuthorizer.cpp16
-rw-r--r--WebCore/storage/OriginUsageRecord.cpp6
2 files changed, 15 insertions, 7 deletions
diff --git a/WebCore/storage/DatabaseAuthorizer.cpp b/WebCore/storage/DatabaseAuthorizer.cpp
index d87d4d9..6b6b147 100644
--- a/WebCore/storage/DatabaseAuthorizer.cpp
+++ b/WebCore/storage/DatabaseAuthorizer.cpp
@@ -263,21 +263,29 @@ int DatabaseAuthorizer::dropTempView(const String&)
return (m_readOnly && m_securityEnabled ? SQLAuthDeny : SQLAuthAllow);
}
-int DatabaseAuthorizer::createVTable(const String&, const String&)
+int DatabaseAuthorizer::createVTable(const String& tableName, const String& moduleName)
{
if (m_readOnly && m_securityEnabled)
return SQLAuthDeny;
+ // fts2 is used in Chromium
+ if (moduleName != "fts2")
+ return SQLAuthDeny;
+
m_lastActionChangedDatabase = true;
- return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow;
+ return denyBasedOnTableName(tableName);
}
-int DatabaseAuthorizer::dropVTable(const String&, const String&)
+int DatabaseAuthorizer::dropVTable(const String& tableName, const String& moduleName)
{
if (m_readOnly && m_securityEnabled)
return SQLAuthDeny;
- return m_securityEnabled ? SQLAuthDeny : SQLAuthAllow;
+ // fts2 is used in Chromium
+ if (moduleName != "fts2")
+ return SQLAuthDeny;
+
+ return denyBasedOnTableName(tableName);
}
int DatabaseAuthorizer::allowDelete(const String& tableName)
diff --git a/WebCore/storage/OriginUsageRecord.cpp b/WebCore/storage/OriginUsageRecord.cpp
index 684df53..8128a1b 100644
--- a/WebCore/storage/OriginUsageRecord.cpp
+++ b/WebCore/storage/OriginUsageRecord.cpp
@@ -42,8 +42,8 @@ OriginUsageRecord::OriginUsageRecord()
void OriginUsageRecord::addDatabase(const String& identifier, const String& fullPath)
{
ASSERT(!m_databaseMap.contains(identifier));
- ASSERT_ARG(identifier, identifier.impl()->refCount() == 1);
- ASSERT_ARG(fullPath, fullPath.impl()->refCount() == 1);
+ ASSERT_ARG(identifier, identifier.impl()->hasOneRef());
+ ASSERT_ARG(fullPath, fullPath.impl()->hasOneRef());
m_databaseMap.set(identifier, DatabaseEntry(fullPath));
m_unknownSet.add(identifier);
@@ -63,7 +63,7 @@ void OriginUsageRecord::removeDatabase(const String& identifier)
void OriginUsageRecord::markDatabase(const String& identifier)
{
ASSERT(m_databaseMap.contains(identifier));
- ASSERT_ARG(identifier, identifier.impl()->refCount() == 1);
+ ASSERT_ARG(identifier, identifier.impl()->hasOneRef());
m_unknownSet.add(identifier);
m_cachedDiskUsageIsValid = false;