summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/storage/StorageAreaImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/storage/StorageAreaImpl.cpp')
-rw-r--r--Source/WebCore/storage/StorageAreaImpl.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/WebCore/storage/StorageAreaImpl.cpp b/Source/WebCore/storage/StorageAreaImpl.cpp
index 54df135..bb2d702 100644
--- a/Source/WebCore/storage/StorageAreaImpl.cpp
+++ b/Source/WebCore/storage/StorageAreaImpl.cpp
@@ -231,6 +231,31 @@ void StorageAreaImpl::close()
#endif
}
+void StorageAreaImpl::clearForOriginDeletion()
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ if (m_storageMap->length()) {
+ unsigned quota = m_storageMap->quota();
+ m_storageMap = StorageMap::create(quota);
+ }
+
+ if (m_storageAreaSync) {
+ m_storageAreaSync->scheduleClear();
+ m_storageAreaSync->scheduleCloseDatabase();
+ }
+}
+
+void StorageAreaImpl::sync()
+{
+ ASSERT(!m_isShutdown);
+ blockUntilImportComplete();
+
+ if (m_storageAreaSync)
+ m_storageAreaSync->scheduleSync();
+}
+
void StorageAreaImpl::blockUntilImportComplete() const
{
if (m_storageAreaSync)