Commit 18ed1cdf authored by beidson@apple.com's avatar beidson@apple.com

WebCore:

2008-05-06  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        Preparation for upcoming work making LocalStorage persistent.

        When the application terminates, all pending local storage writes need to be
        sync'ed out to disk.
        This works n combination with platform specific code in WebKit that calls it.

        * WebCore.base.exp:

        * page/PageGroup.cpp:
        (WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
        * page/PageGroup.h:

        * storage/LocalStorage.cpp:
        (WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
          local storage thread in the future.
        * storage/LocalStorage.h:

WebKit/mac:

2008-05-06  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        Preparation for upcoming work making LocalStorage persistent.

        When the application terminates, all LocalStorage areas must be sync'ed out to disk first.

        * WebView/WebView.mm:
        (+[WebView _applicationWillTerminate]):  Close all LocalStorage areas before quitting.

WebKit/win:

2008-05-06  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        Preparation for upcoming work making LocalStorage persistent.

        When the application terminates, all LocalStorage areas must be sync'ed out to disk first.

        * WebKitDLL.cpp:
        (shutDownWebKit): Close all LocalStorage areas before quitting.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fab469a2
2008-05-06 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler
Preparation for upcoming work making LocalStorage persistent.
When the application terminates, all pending local storage writes need to be
sync'ed out to disk.
This works n combination with platform specific code in WebKit that calls it.
* WebCore.base.exp:
* page/PageGroup.cpp:
(WebCore::PageGroup::closeLocalStorage): Close all open LocalStorage objects
* page/PageGroup.h:
* storage/LocalStorage.cpp:
(WebCore::LocalStorage::close): Placeholder for what will sync and terminate the
local storage thread in the future.
* storage/LocalStorage.h:
2008-05-06 Brady Eidson <beidson@apple.com>
Rubberstamped by David Kilzer
......@@ -620,6 +620,7 @@ __ZN7WebCore9HTMLNames8inputTagE
__ZN7WebCore9PageCache11setCapacityEi
__ZN7WebCore9PageCache27releaseAutoreleasedPagesNowEv
__ZN7WebCore9PageGroup14addVisitedLinkEPKtm
__ZN7WebCore9PageGroup17closeLocalStorageEv
__ZN7WebCore9PageGroup21removeAllVisitedLinksEv
__ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
__ZN7WebCore9Selection22expandUsingGranularityENS_15TextGranularityE
......
......@@ -84,6 +84,19 @@ PageGroup* PageGroup::pageGroup(const String& groupName)
return result.first->second;
}
void PageGroup::closeLocalStorage()
{
if (!pageGroups)
return;
PageGroupMap::iterator end = pageGroups->end();
for (PageGroupMap::iterator it = pageGroups->begin(); it != end; ++it) {
if (LocalStorage* localStorage = it->second->localStorage())
localStorage->close();
}
}
void PageGroup::addPage(Page* page)
{
ASSERT(page);
......
......@@ -42,6 +42,7 @@ namespace WebCore {
PageGroup(Page*);
static PageGroup* pageGroup(const String& groupName);
static void closeLocalStorage();
const HashSet<Page*>& pages() const { return m_pages; }
......
......@@ -60,4 +60,9 @@ PassRefPtr<StorageArea> LocalStorage::storageArea(Frame* sourceFrame, SecurityOr
return storageArea.release();
}
void LocalStorage::close()
{
// FIXME: Make sure all pending writes complete and terminate the background thread
}
} // namespace WebCore
......@@ -43,6 +43,8 @@ namespace WebCore {
PassRefPtr<StorageArea> storageArea(Frame* sourceFrame, SecurityOrigin*);
void close();
private:
LocalStorage(PageGroup*, const String& path);
......
2008-05-06 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler
Preparation for upcoming work making LocalStorage persistent.
When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
* WebView/WebView.mm:
(+[WebView _applicationWillTerminate]): Close all LocalStorage areas before quitting.
2008-05-05 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
......
......@@ -111,6 +111,7 @@
#import <WebCore/MIMETypeRegistry.h>
#import <WebCore/Page.h>
#import <WebCore/PageCache.h>
#import <WebCore/PageGroup.h>
#import <WebCore/PlatformMouseEvent.h>
#import <WebCore/ProgressTracker.h>
#import <WebCore/SelectionController.h>
......@@ -1707,6 +1708,8 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
applicationIsTerminating = YES;
if (!pluginDatabaseClientCount)
[WebPluginDatabase closeSharedDatabase];
PageGroup::closeLocalStorage();
}
+ (BOOL)canShowMIMEType:(NSString *)MIMEType
......
2008-05-06 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler
Preparation for upcoming work making LocalStorage persistent.
When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
* WebKitDLL.cpp:
(shutDownWebKit): Close all LocalStorage areas before quitting.
2008-05-05 Anders Carlsson <andersca@apple.com>
Reviewed by John.
......
......@@ -37,6 +37,7 @@
#include <WebCore/COMPtr.h>
#include <WebCore/IconDatabase.h>
#include <WebCore/Page.h>
#include <WebCore/PageGroup.h>
#include <WebCore/SharedBuffer.h>
#include <WebCore/Widget.h>
#include <wtf/Vector.h>
......@@ -57,6 +58,7 @@ static CLSID gRegCLSIDs[] = {
void shutDownWebKit()
{
WebCore::iconDatabase()->close();
WebCore::PageGroup::closeLocalStorage();
}
STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment