Consider closing unused localStorage database after a timeout.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2012 01:03:37 +0000 (01:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2012 01:03:37 +0000 (01:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90713

For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
we can close the underlying sqlite database.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2012-07-09
Reviewed by Brady Eidson.

Source/WebCore:

Test: storage/domstorage/storage-close-database-on-idle.html

* storage/Storage.cpp:
(WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it.
(WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it.
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::StorageAreaImpl):
(WebCore::StorageAreaImpl::incrementAccessCount):
(WebCore):
(WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document
    referencing to this storageArea.
(WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database.
* storage/StorageAreaImpl.h:
(StorageAreaImpl):
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out.
* storage/StorageTracker.cpp:
(WebCore):
(WebCore::StorageTracker::StorageTracker):
* storage/StorageTracker.h:
(WebCore::StorageTracker::storageDatabaseIdleInterval):
(WebCore::StorageTracker::setStorageDatabaseIdleInterval):  set the timeout value that we will wait before closing the
    database.  This is currently used by DumpRenderTree only.
(StorageTracker):

Source/WebKit/mac:

* Storage/WebStorageManager.mm:
(+[WebStorageManager setStorageDatabaseIdleInterval:]): add a new method for DumpRenderTree to set the timeout
    that we will wait before closing database.
(initializeLocalStoragePath):
* Storage/WebStorageManagerPrivate.h:

Tools:

* DumpRenderTree/LayoutTestController.cpp: add a JS method setStorageDatabaseIdleInterval to testRunner
    to set a different timeout value for closing localStorage database.
(setStorageDatabaseIdleIntervalCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setStorageDatabaseIdleInterval): add empty method.
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setStorageDatabaseIdleInterval): ditto.
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setStorageDatabaseIdleInterval): ditto.
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setStorageDatabaseIdleInterval): ditto.

LayoutTests:

* platform/chromium/TestExpectations: the test needs setCacheModel implementation, skip it in chromium.
* storage/domstorage/storage-close-database-on-idle-expected.txt: Added.
* storage/domstorage/storage-close-database-on-idle.html: Added.
* storage/resources/storage-close-data-on-idle-switch.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
LayoutTests/storage/domstorage/storage-close-database-on-idle-expected.txt [new file with mode: 0644]
LayoutTests/storage/domstorage/storage-close-database-on-idle.html [new file with mode: 0644]
LayoutTests/storage/resources/storage-close-data-on-idle-switch.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/storage/Storage.cpp
Source/WebCore/storage/StorageArea.h
Source/WebCore/storage/StorageAreaImpl.cpp
Source/WebCore/storage/StorageAreaImpl.h
Source/WebCore/storage/StorageAreaSync.cpp
Source/WebCore/storage/StorageTracker.cpp
Source/WebCore/storage/StorageTracker.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Storage/WebStorageManager.mm
Source/WebKit/mac/Storage/WebStorageManagerPrivate.h
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp

index 2a751d3..1f97cf8 100644 (file)
@@ -1,3 +1,18 @@
+2012-07-09  Yongjun Zhang  <yongjun_zhang@apple.com>
+
+        Consider closing unused localStorage database after a timeout.
+        https://bugs.webkit.org/show_bug.cgi?id=90713
+
+        For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
+        we can close the underlying sqlite database.
+
+        Reviewed by Brady Eidson.
+
+        * platform/chromium/TestExpectations: the test needs setCacheModel implementation, skip it in chromium.
+        * storage/domstorage/storage-close-database-on-idle-expected.txt: Added.
+        * storage/domstorage/storage-close-database-on-idle.html: Added.
+        * storage/resources/storage-close-data-on-idle-switch.html: Added.
+
 2012-07-09  Joshua Bell  <jsbell@chromium.org>
 
         IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string
index 6ff7a0e..aab96c7 100644 (file)
@@ -734,9 +734,10 @@ WONTFIX SKIP : http/tests/globalhistory = PASS
 // For more details, see discussions at issue 20570.
 WONTFIX SKIP : fast/forms/get-forms-to-about-blank.html = PASS
 
-// This test requires LayoutTestController.setCacheModel, which we don't
+// These tests requires LayoutTestController.setCacheModel, which we don't
 // implement because we can't emulate the caching behaviors it expects.
 WONTFIX SKIP : fast/dom/HTMLScriptElement/nested-execution.html = PASS
+WONTFIX SKIP : storage/domstorage/storage-close-database-on-idle.html = PASS
 
 // Deletion UI is a Mail-ism. We don't need to worry about this.
 WONTFIX SKIP : editing/deleting/deletionUI-single-instance.html = PASS
diff --git a/LayoutTests/storage/domstorage/storage-close-database-on-idle-expected.txt b/LayoutTests/storage/domstorage/storage-close-database-on-idle-expected.txt
new file mode 100644 (file)
index 0000000..f7f0fa5
--- /dev/null
@@ -0,0 +1,3 @@
+PASS
+PASS
+
diff --git a/LayoutTests/storage/domstorage/storage-close-database-on-idle.html b/LayoutTests/storage/domstorage/storage-close-database-on-idle.html
new file mode 100644 (file)
index 0000000..03a76da
--- /dev/null
@@ -0,0 +1,62 @@
+<html>
+<head>
+<script>
+
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function log(a)
+{
+    document.getElementById("logger").innerHTML += a + "<br>";
+}
+
+function loadNextPage()
+{
+    location.href = "../resources/storage-close-data-on-idle-switch.html";
+}
+
+function runTest()
+{
+    if (window.testRunner) {
+        testRunner.setStorageDatabaseIdleInterval(0);
+        testRunner.setCacheModel(0); // WebCacheModelDocumentViewer.
+    }
+
+    // Test to make sure the storage values don't change after the database is closed.
+    if ("localStorage" in window) {
+        var loadCount = window.sessionStorage['loadCount'];
+        if (loadCount !== undefined)
+            loadCount++;
+        else
+            loadCount = 1;
+
+        window.sessionStorage['loadCount'] = loadCount;
+
+        if (loadCount == 1 ) {
+            window.localStorage.clear();
+            window.localStorage['foo'] = 'FOO';
+            window.localStorage['bar'] = 'BAR';
+
+            setTimeout("loadNextPage()", 0);
+        } else {
+            // Test if we still have the right values.
+            log(window.localStorage['foo'] === 'FOO' ? 'PASS' : 'FAIL');
+            log(window.localStorage['bar'] === 'BAR' ? 'PASS' : 'FAIL');
+
+            if (window.testRunner) {
+                testRunner.setStorageDatabaseIdleInterval(300);
+                window.testRunner.notifyDone();
+            }
+        }
+    }
+}
+
+</script>
+</head>
+<body onload="runTest();">
+<div id="logger"></div>
+</body>
+</html>
+
diff --git a/LayoutTests/storage/resources/storage-close-data-on-idle-switch.html b/LayoutTests/storage/resources/storage-close-data-on-idle-switch.html
new file mode 100644 (file)
index 0000000..9c56380
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+<script>
+    function swingBack() 
+    {
+        location.href='../domstorage/storage-close-database-on-idle.html';
+    }
+</script>
+<body onload='setTimeout(swingBack(), 100);'>
+</body>
+</html>
index e4ba8c0..301f1e6 100644 (file)
@@ -1,3 +1,40 @@
+2012-07-09  Yongjun Zhang  <yongjun_zhang@apple.com>
+
+        Consider closing unused localStorage database after a timeout.
+        https://bugs.webkit.org/show_bug.cgi?id=90713
+
+        For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
+        we can close the underlying sqlite database.
+
+        Reviewed by Brady Eidson.
+
+        Test: storage/domstorage/storage-close-database-on-idle.html
+
+        * storage/Storage.cpp:
+        (WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it.
+        (WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it.
+        * storage/StorageArea.h:
+        (StorageArea):
+        * storage/StorageAreaImpl.cpp:
+        (WebCore::StorageAreaImpl::StorageAreaImpl):
+        (WebCore::StorageAreaImpl::incrementAccessCount):
+        (WebCore):
+        (WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document
+            referencing to this storageArea.
+        (WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database.
+        * storage/StorageAreaImpl.h:
+        (StorageAreaImpl):
+        * storage/StorageAreaSync.cpp:
+        (WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out.
+        * storage/StorageTracker.cpp:
+        (WebCore):
+        (WebCore::StorageTracker::StorageTracker):
+        * storage/StorageTracker.h:
+        (WebCore::StorageTracker::storageDatabaseIdleInterval):
+        (WebCore::StorageTracker::setStorageDatabaseIdleInterval):  set the timeout value that we will wait before closing the
+            database.  This is currently used by DumpRenderTree only.
+        (StorageTracker):
+
 2012-07-09  Joshua Bell  <jsbell@chromium.org>
 
         IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string
index 260ef4f..583ef38 100644 (file)
@@ -46,10 +46,14 @@ Storage::Storage(Frame* frame, PassRefPtr<StorageArea> storageArea)
 {
     ASSERT(m_frame);
     ASSERT(m_storageArea);
+    if (m_storageArea)
+        m_storageArea->incrementAccessCount();
 }
 
 Storage::~Storage()
 {
+    if (m_storageArea)
+        m_storageArea->decrementAccessCount();
 }
 
 unsigned Storage::length() const
index 5da1bc1..3b2492a 100644 (file)
@@ -55,6 +55,9 @@ namespace WebCore {
         virtual bool contains(const String& key, Frame* sourceFrame) const = 0;
 
         virtual bool disabledByPrivateBrowsingInFrame(const Frame* sourceFrame) const = 0;
+
+        virtual void incrementAccessCount() { }
+        virtual void decrementAccessCount() { }
     };
 
 } // namespace WebCore
index 72e8657..0602da2 100644 (file)
@@ -55,6 +55,8 @@ inline StorageAreaImpl::StorageAreaImpl(StorageType storageType, PassRefPtr<Secu
 #ifndef NDEBUG
     , m_isShutdown(false)
 #endif
+    , m_accessCount(0)
+    , m_closeDatabaseTimer(this, &StorageAreaImpl::closeDatabaseTimerFired)
 {
     ASSERT(isMainThread());
     ASSERT(m_securityOrigin);
@@ -93,6 +95,8 @@ StorageAreaImpl::StorageAreaImpl(StorageAreaImpl* area)
 #ifndef NDEBUG
     , m_isShutdown(area->m_isShutdown)
 #endif
+    , m_accessCount(0)
+    , m_closeDatabaseTimer(this, &StorageAreaImpl::closeDatabaseTimerFired)
 {
     ASSERT(isMainThread());
     ASSERT(m_securityOrigin);
@@ -260,4 +264,31 @@ void StorageAreaImpl::blockUntilImportComplete() const
         m_storageAreaSync->blockUntilImportComplete();
 }
 
+void StorageAreaImpl::incrementAccessCount()
+{
+    m_accessCount++;
+
+    if (m_closeDatabaseTimer.isActive())
+        m_closeDatabaseTimer.stop();
+}
+
+void StorageAreaImpl::decrementAccessCount()
+{
+    --m_accessCount;
+    ASSERT(m_accessCount >= 0);
+
+    if (!m_accessCount) {
+        if (m_closeDatabaseTimer.isActive())
+            m_closeDatabaseTimer.stop();
+        m_closeDatabaseTimer.startOneShot(StorageTracker::tracker().storageDatabaseIdleInterval());
+    }
+}
+
+void StorageAreaImpl::closeDatabaseTimerFired(Timer<StorageAreaImpl> *)
+{
+    blockUntilImportComplete();
+    if (m_storageAreaSync)
+        m_storageAreaSync->scheduleCloseDatabase();
+}
+
 }
index a56361f..be0451c 100644 (file)
@@ -27,6 +27,7 @@
 #define StorageAreaImpl_h
 
 #include "StorageArea.h"
+#include "Timer.h"
 
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
@@ -53,6 +54,9 @@ namespace WebCore {
 
         virtual bool disabledByPrivateBrowsingInFrame(const Frame* sourceFrame) const;
 
+        virtual void incrementAccessCount();
+        virtual void decrementAccessCount();
+
         PassRefPtr<StorageAreaImpl> copy();
         void close();
 
@@ -69,6 +73,7 @@ namespace WebCore {
         StorageAreaImpl(StorageAreaImpl*);
 
         void blockUntilImportComplete() const;
+        void closeDatabaseTimerFired(Timer<StorageAreaImpl>*);
 
         StorageType m_storageType;
         RefPtr<SecurityOrigin> m_securityOrigin;
@@ -80,6 +85,8 @@ namespace WebCore {
 #ifndef NDEBUG
         bool m_isShutdown;
 #endif
+        unsigned m_accessCount;
+        Timer<StorageAreaImpl> m_closeDatabaseTimer;
     };
 
 } // namespace WebCore
index 3049058..44209c6 100644 (file)
@@ -382,10 +382,16 @@ void StorageAreaSync::sync(bool clearItems, const HashMap<String, String>& items
 {
     ASSERT(!isMainThread());
 
-    if (items.isEmpty() && !clearItems)
+    if (items.isEmpty() && !clearItems && !m_syncCloseDatabase)
         return;
     if (m_databaseOpenFailed)
         return;
+
+    if (!m_database.isOpen() && m_syncCloseDatabase) {
+        m_syncCloseDatabase = false;
+        return;
+    }
+
     if (!m_database.isOpen())
         openDatabase(CreateIfNonExistent);
     if (!m_database.isOpen())
index 9e18dd4..0bb34b0 100644 (file)
@@ -46,6 +46,10 @@ namespace WebCore {
 
 static StorageTracker* storageTracker = 0;
 
+// If there is no document referencing a storage database, close the underlying database
+// after it has been idle for m_StorageDatabaseIdleInterval seconds.
+static const double DefaultStorageDatabaseIdleInterval = 300;
+    
 void StorageTracker::initializeTracker(const String& storagePath, StorageTrackerClient* client)
 {
     ASSERT(isMainThread());
@@ -91,6 +95,7 @@ StorageTracker::StorageTracker(const String& storagePath)
     , m_isActive(false)
     , m_needsInitialization(false)
     , m_finishedImportingOriginIdentifiers(false)
+    , m_StorageDatabaseIdleInterval(DefaultStorageDatabaseIdleInterval)
 {
 }
 
@@ -627,5 +632,5 @@ long long StorageTracker::diskUsageForOrigin(SecurityOrigin* origin)
 
     return SQLiteFileSystem::getDatabaseFileSize(path);
 }
-    
+
 } // namespace WebCore
index 9e1945a..9ee23f5 100644 (file)
@@ -74,6 +74,9 @@ public:
 
     void syncLocalStorage();
 
+    double storageDatabaseIdleInterval() { return m_StorageDatabaseIdleInterval; }
+    void setStorageDatabaseIdleInterval(double interval) { m_StorageDatabaseIdleInterval = interval; }
+
 private:
     StorageTracker(const String& storagePath);
     static void scheduleTask(void*);
@@ -118,6 +121,7 @@ private:
     bool m_isActive;
     bool m_needsInitialization;
     bool m_finishedImportingOriginIdentifiers;
+    double m_StorageDatabaseIdleInterval;
 };
     
 } // namespace WebCore
index 5360f52..714222e 100644 (file)
@@ -1,3 +1,19 @@
+2012-07-09  Yongjun Zhang  <yongjun_zhang@apple.com>
+
+        Consider closing unused localStorage database after a timeout.
+        https://bugs.webkit.org/show_bug.cgi?id=90713
+
+        For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
+        we can close the underlying sqlite database.
+
+        Reviewed by Brady Eidson.
+
+        * Storage/WebStorageManager.mm:
+        (+[WebStorageManager setStorageDatabaseIdleInterval:]): add a new method for DumpRenderTree to set the timeout
+            that we will wait before closing database.
+        (initializeLocalStoragePath):
+        * Storage/WebStorageManagerPrivate.h:
+
 2012-07-09  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r122107.
index bb24b3e..eea21fd 100644 (file)
@@ -97,7 +97,12 @@ static pthread_once_t registerLocalStoragePath = PTHREAD_ONCE_INIT;
     return sLocalStoragePath;
 }
 
-static void initializeLocalStoragePath() 
++ (void)setStorageDatabaseIdleInterval:(double)interval
+{
+    StorageTracker::tracker().setStorageDatabaseIdleInterval(interval);
+}
+
+static void initializeLocalStoragePath()
 {
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     sLocalStoragePath = [defaults objectForKey:WebStorageDirectoryDefaultsKey];
index ab94871..79fe005 100644 (file)
@@ -43,6 +43,6 @@ extern NSString * const WebStorageDidModifyOriginNotification;
 - (void)syncFileSystemAndTrackerDatabase;
 
 + (NSString *)_storageDirectoryPath;
-
++ (void)setStorageDatabaseIdleInterval:(double)interval;
 @end
 
index d9e90fa..87daf3f 100644 (file)
@@ -1,3 +1,28 @@
+2012-07-09  Yongjun Zhang  <yongjun_zhang@apple.com>
+
+        Consider closing unused localStorage database after a timeout.
+        https://bugs.webkit.org/show_bug.cgi?id=90713
+
+        For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
+        we can close the underlying sqlite database.
+
+        Reviewed by Brady Eidson.
+
+        * DumpRenderTree/LayoutTestController.cpp: add a JS method setStorageDatabaseIdleInterval to testRunner
+            to set a different timeout value for closing localStorage database.
+        (setStorageDatabaseIdleIntervalCallback):
+        (LayoutTestController::staticFunctions):
+        * DumpRenderTree/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::setStorageDatabaseIdleInterval): add empty method.
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::setStorageDatabaseIdleInterval): ditto.
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        (LayoutTestController::setStorageDatabaseIdleInterval): ditto.
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        (LayoutTestController::setStorageDatabaseIdleInterval): ditto.
+
 2012-07-09  Adam Klein  <adamk@chromium.org>
 
         Rename WebCore::WebKitMutationObserver to WebCore::MutationObserver
index cd01d1c..8dd9ff2 100644 (file)
@@ -2225,6 +2225,20 @@ static JSValueRef setHasCustomFullScreenBehaviorCallback(JSContextRef context, J
     return JSValueMakeUndefined(context);
 }
 
+static JSValueRef setStorageDatabaseIdleIntervalCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    if (argumentCount != 1)
+        return JSValueMakeUndefined(context);
+
+    double interval = JSValueToNumber(context, arguments[0], exception);
+    ASSERT(!*exception);
+
+    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    controller->setStorageDatabaseIdleInterval(interval);
+
+    return JSValueMakeUndefined(context);
+}
+
 static void layoutTestControllerObjectFinalize(JSObjectRef object)
 {
     LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(object));
@@ -2445,6 +2459,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "setBackingScaleFactor", setBackingScaleFactorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "preciseTime", preciseTimeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setHasCustomFullScreenBehavior", setHasCustomFullScreenBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "setStorageDatabaseIdleInterval", setStorageDatabaseIdleIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }
     };
 
index 54ca927..33f143e 100644 (file)
@@ -366,6 +366,8 @@ public:
     void setHasCustomFullScreenBehavior(bool value) { m_customFullScreenBehavior = value; }
     bool hasCustomFullScreenBehavior() const { return m_customFullScreenBehavior; }
 
+    void setStorageDatabaseIdleInterval(double);
+
 private:
     LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash);
 
index 070af8c..a0741f7 100644 (file)
@@ -928,3 +928,8 @@ void LayoutTestController::deliverWebIntent(JSStringRef action, JSStringRef type
 {
     DumpRenderTreeSupportEfl::deliverWebIntent(browser->mainFrame(), action, type, data);
 }
+
+void LayoutTestController::setStorageDatabaseIdleInterval(double)
+{
+    notImplemented();
+}
index 0b57ad0..c22c6a3 100644 (file)
@@ -1010,3 +1010,8 @@ void LayoutTestController::deliverWebIntent(JSStringRef, JSStringRef, JSStringRe
 {
     // FIXME: Implement this.
 }
+
+void LayoutTestController::setStorageDatabaseIdleInterval(double)
+{
+    // FIXME: Implement this.
+}
index 884572e..777f30a 100644 (file)
@@ -201,6 +201,11 @@ void LayoutTestController::deleteAllLocalStorage()
     [[WebStorageManager sharedWebStorageManager] deleteAllOrigins];
 }
 
+void LayoutTestController::setStorageDatabaseIdleInterval(double interval)
+{
+    [WebStorageManager setStorageDatabaseIdleInterval:interval];
+}
+
 JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
 {
     return originsArrayToJS(context, [[WebStorageManager sharedWebStorageManager] origins]);
index 9d03abc..f480cb3 100644 (file)
@@ -1483,3 +1483,8 @@ void LayoutTestController::deliverWebIntent(JSStringRef, JSStringRef, JSStringRe
 {
     // FIXME: Implement this.
 }
+
+void LayoutTestController::setStorageDatabaseIdleInterval(double)
+{
+    // FIXME: Implement this.
+}