Title: [122174] trunk
Revision
122174
Author
[email protected]
Date
2012-07-09 18:03:37 -0700 (Mon, 09 Jul 2012)

Log Message

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.

Patch by Yongjun Zhang <[email protected]> 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.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (122173 => 122174)


--- trunk/LayoutTests/ChangeLog	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/LayoutTests/ChangeLog	2012-07-10 01:03:37 UTC (rev 122174)
@@ -1,3 +1,18 @@
+2012-07-09  Yongjun Zhang  <[email protected]>
+
+        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  <[email protected]>
 
         IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (122173 => 122174)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-07-10 01:03:37 UTC (rev 122174)
@@ -734,9 +734,10 @@
 // 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

Added: trunk/LayoutTests/storage/domstorage/storage-close-database-on-idle-expected.txt (0 => 122174)


--- trunk/LayoutTests/storage/domstorage/storage-close-database-on-idle-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/storage/domstorage/storage-close-database-on-idle-expected.txt	2012-07-10 01:03:37 UTC (rev 122174)
@@ -0,0 +1,3 @@
+PASS
+PASS
+

Added: trunk/LayoutTests/storage/domstorage/storage-close-database-on-idle.html (0 => 122174)


--- trunk/LayoutTests/storage/domstorage/storage-close-database-on-idle.html	                        (rev 0)
+++ trunk/LayoutTests/storage/domstorage/storage-close-database-on-idle.html	2012-07-10 01:03:37 UTC (rev 122174)
@@ -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 = ""
+}
+
+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>
+

Added: trunk/LayoutTests/storage/resources/storage-close-data-on-idle-switch.html (0 => 122174)


--- trunk/LayoutTests/storage/resources/storage-close-data-on-idle-switch.html	                        (rev 0)
+++ trunk/LayoutTests/storage/resources/storage-close-data-on-idle-switch.html	2012-07-10 01:03:37 UTC (rev 122174)
@@ -0,0 +1,10 @@
+<html>
+<script>
+    function swingBack() 
+    {
+        location.href='';
+    }
+</script>
+<body _onload_='setTimeout(swingBack(), 100);'>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (122173 => 122174)


--- trunk/Source/WebCore/ChangeLog	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/ChangeLog	2012-07-10 01:03:37 UTC (rev 122174)
@@ -1,3 +1,40 @@
+2012-07-09  Yongjun Zhang  <[email protected]>
+
+        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  <[email protected]>
 
         IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string

Modified: trunk/Source/WebCore/storage/Storage.cpp (122173 => 122174)


--- trunk/Source/WebCore/storage/Storage.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/Storage.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -46,10 +46,14 @@
 {
     ASSERT(m_frame);
     ASSERT(m_storageArea);
+    if (m_storageArea)
+        m_storageArea->incrementAccessCount();
 }
 
 Storage::~Storage()
 {
+    if (m_storageArea)
+        m_storageArea->decrementAccessCount();
 }
 
 unsigned Storage::length() const

Modified: trunk/Source/WebCore/storage/StorageArea.h (122173 => 122174)


--- trunk/Source/WebCore/storage/StorageArea.h	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/StorageArea.h	2012-07-10 01:03:37 UTC (rev 122174)
@@ -55,6 +55,9 @@
         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

Modified: trunk/Source/WebCore/storage/StorageAreaImpl.cpp (122173 => 122174)


--- trunk/Source/WebCore/storage/StorageAreaImpl.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/StorageAreaImpl.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -55,6 +55,8 @@
 #ifndef NDEBUG
     , m_isShutdown(false)
 #endif
+    , m_accessCount(0)
+    , m_closeDatabaseTimer(this, &StorageAreaImpl::closeDatabaseTimerFired)
 {
     ASSERT(isMainThread());
     ASSERT(m_securityOrigin);
@@ -93,6 +95,8 @@
 #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 @@
         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();
+}
+
+}

Modified: trunk/Source/WebCore/storage/StorageAreaImpl.h (122173 => 122174)


--- trunk/Source/WebCore/storage/StorageAreaImpl.h	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/StorageAreaImpl.h	2012-07-10 01:03:37 UTC (rev 122174)
@@ -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 @@
 
         virtual bool disabledByPrivateBrowsingInFrame(const Frame* sourceFrame) const;
 
+        virtual void incrementAccessCount();
+        virtual void decrementAccessCount();
+
         PassRefPtr<StorageAreaImpl> copy();
         void close();
 
@@ -69,6 +73,7 @@
         StorageAreaImpl(StorageAreaImpl*);
 
         void blockUntilImportComplete() const;
+        void closeDatabaseTimerFired(Timer<StorageAreaImpl>*);
 
         StorageType m_storageType;
         RefPtr<SecurityOrigin> m_securityOrigin;
@@ -80,6 +85,8 @@
 #ifndef NDEBUG
         bool m_isShutdown;
 #endif
+        unsigned m_accessCount;
+        Timer<StorageAreaImpl> m_closeDatabaseTimer;
     };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/storage/StorageAreaSync.cpp (122173 => 122174)


--- trunk/Source/WebCore/storage/StorageAreaSync.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/StorageAreaSync.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -382,10 +382,16 @@
 {
     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())

Modified: trunk/Source/WebCore/storage/StorageTracker.cpp (122173 => 122174)


--- trunk/Source/WebCore/storage/StorageTracker.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/StorageTracker.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -46,6 +46,10 @@
 
 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 @@
     , m_isActive(false)
     , m_needsInitialization(false)
     , m_finishedImportingOriginIdentifiers(false)
+    , m_StorageDatabaseIdleInterval(DefaultStorageDatabaseIdleInterval)
 {
 }
 
@@ -627,5 +632,5 @@
 
     return SQLiteFileSystem::getDatabaseFileSize(path);
 }
-    
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/storage/StorageTracker.h (122173 => 122174)


--- trunk/Source/WebCore/storage/StorageTracker.h	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebCore/storage/StorageTracker.h	2012-07-10 01:03:37 UTC (rev 122174)
@@ -74,6 +74,9 @@
 
     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 @@
     bool m_isActive;
     bool m_needsInitialization;
     bool m_finishedImportingOriginIdentifiers;
+    double m_StorageDatabaseIdleInterval;
 };
     
 } // namespace WebCore

Modified: trunk/Source/WebKit/mac/ChangeLog (122173 => 122174)


--- trunk/Source/WebKit/mac/ChangeLog	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-07-10 01:03:37 UTC (rev 122174)
@@ -1,3 +1,19 @@
+2012-07-09  Yongjun Zhang  <[email protected]>
+
+        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  <[email protected]>
 
         Unreviewed, rolling out r122107.

Modified: trunk/Source/WebKit/mac/Storage/WebStorageManager.mm (122173 => 122174)


--- trunk/Source/WebKit/mac/Storage/WebStorageManager.mm	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebKit/mac/Storage/WebStorageManager.mm	2012-07-10 01:03:37 UTC (rev 122174)
@@ -97,8 +97,13 @@
     return sLocalStoragePath;
 }
 
-static void initializeLocalStoragePath() 
++ (void)setStorageDatabaseIdleInterval:(double)interval
 {
+    StorageTracker::tracker().setStorageDatabaseIdleInterval(interval);
+}
+
+static void initializeLocalStoragePath()
+{
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     sLocalStoragePath = [defaults objectForKey:WebStorageDirectoryDefaultsKey];
     if (!sLocalStoragePath || ![sLocalStoragePath isKindOfClass:[NSString class]]) {

Modified: trunk/Source/WebKit/mac/Storage/WebStorageManagerPrivate.h (122173 => 122174)


--- trunk/Source/WebKit/mac/Storage/WebStorageManagerPrivate.h	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Source/WebKit/mac/Storage/WebStorageManagerPrivate.h	2012-07-10 01:03:37 UTC (rev 122174)
@@ -43,6 +43,6 @@
 - (void)syncFileSystemAndTrackerDatabase;
 
 + (NSString *)_storageDirectoryPath;
-
++ (void)setStorageDatabaseIdleInterval:(double)interval;
 @end
 

Modified: trunk/Tools/ChangeLog (122173 => 122174)


--- trunk/Tools/ChangeLog	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/ChangeLog	2012-07-10 01:03:37 UTC (rev 122174)
@@ -1,3 +1,28 @@
+2012-07-09  Yongjun Zhang  <[email protected]>
+
+        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  <[email protected]>
 
         Rename WebCore::WebKitMutationObserver to WebCore::MutationObserver

Modified: trunk/Tools/DumpRenderTree/LayoutTestController.cpp (122173 => 122174)


--- trunk/Tools/DumpRenderTree/LayoutTestController.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -2225,6 +2225,20 @@
     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 @@
         { "setBackingScaleFactor", setBackingScaleFactorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "preciseTime", preciseTimeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setHasCustomFullScreenBehavior", setHasCustomFullScreenBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "setStorageDatabaseIdleInterval", setStorageDatabaseIdleIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }
     };
 

Modified: trunk/Tools/DumpRenderTree/LayoutTestController.h (122173 => 122174)


--- trunk/Tools/DumpRenderTree/LayoutTestController.h	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.h	2012-07-10 01:03:37 UTC (rev 122174)
@@ -366,6 +366,8 @@
     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);
 

Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (122173 => 122174)


--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -928,3 +928,8 @@
 {
     DumpRenderTreeSupportEfl::deliverWebIntent(browser->mainFrame(), action, type, data);
 }
+
+void LayoutTestController::setStorageDatabaseIdleInterval(double)
+{
+    notImplemented();
+}

Modified: trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp (122173 => 122174)


--- trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -1010,3 +1010,8 @@
 {
     // FIXME: Implement this.
 }
+
+void LayoutTestController::setStorageDatabaseIdleInterval(double)
+{
+    // FIXME: Implement this.
+}

Modified: trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm (122173 => 122174)


--- trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm	2012-07-10 01:03:37 UTC (rev 122174)
@@ -201,6 +201,11 @@
     [[WebStorageManager sharedWebStorageManager] deleteAllOrigins];
 }
 
+void LayoutTestController::setStorageDatabaseIdleInterval(double interval)
+{
+    [WebStorageManager setStorageDatabaseIdleInterval:interval];
+}
+
 JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
 {
     return originsArrayToJS(context, [[WebStorageManager sharedWebStorageManager] origins]);

Modified: trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp (122173 => 122174)


--- trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp	2012-07-10 00:48:10 UTC (rev 122173)
+++ trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp	2012-07-10 01:03:37 UTC (rev 122174)
@@ -1483,3 +1483,8 @@
 {
     // FIXME: Implement this.
 }
+
+void LayoutTestController::setStorageDatabaseIdleInterval(double)
+{
+    // FIXME: Implement this.
+}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to