Add WebStorageNamespaceProvider::closeLocalStorage
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2014 20:10:02 +0000 (20:10 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2014 20:10:02 +0000 (20:10 +0000)
commitef3be1ecfb5b9897149d45e80e324f959449fbb4
treef88e820f3994944ed7039a001396074c7dea5c94
parentf040f43e4ac57b10c3f370e58ecfc42cfe8e6e14
Add WebStorageNamespaceProvider::closeLocalStorage
https://bugs.webkit.org/show_bug.cgi?id=139502

Reviewed by Tim Horton.

Source/WebCore:

* page/Page.cpp:
(WebCore::Page::~Page):
Call StorageNamespaceProvider::removePage.

* storage/StorageNamespaceProvider.h:
(WebCore::StorageNamespaceProvider::optionalLocalStorageNamespace):
Helper function that returns the local storage namespace if one exists.

Source/WebKit:

* Storage/WebStorageNamespaceProvider.cpp:
(storageNamespaceProviders):
(WebStorageNamespaceProvider::WebStorageNamespaceProvider):
(WebStorageNamespaceProvider::~WebStorageNamespaceProvider):
Keep track of all live storage namespace providers.

(WebStorageNamespaceProvider::closeLocalStorage):
Loop through all storage namespace providers and call close() on their local storage namespaces.

* Storage/WebStorageNamespaceProvider.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(+[WebView _applicationWillTerminate]):
Call WebStorageNamespaceProvider::closeLocalStorage.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/Page.cpp
Source/WebCore/storage/StorageNamespaceProvider.h
Source/WebKit/ChangeLog
Source/WebKit/Storage/WebStorageNamespaceProvider.cpp
Source/WebKit/Storage/WebStorageNamespaceProvider.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm