Partial revert of r248734 to fix leak of StorageAreaMaps
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2020 23:22:41 +0000 (23:22 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2020 23:22:41 +0000 (23:22 +0000)
commit3254d4dbb2391e1b7dfb4425c3b53312101b5d33
tree291378ec548887e3ac1a0e502b617c7b09f5e488
parent324aee61a7f5978ea5179c8d5bb77e29db87a09b
Partial revert of r248734 to fix leak of StorageAreaMaps
https://bugs.webkit.org/show_bug.cgi?id=207073

Reviewed by Alex Christensen.

Do a partial revert of r248734 so that the StorageNamespaceImpl no longer holds a strong
reference to its StorageAreaMap objects. The code for removing entries from
StorageNamespaceImpl::m_storageAreaMaps (StorageNamespaceImpl::didDestroyStorageAreaMap())
was dead code after r248734 and thus StorageAreaMap were never destroyed.

* WebProcess/WebStorage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::create):
(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::length):
(WebKit::StorageAreaImpl::key):
(WebKit::StorageAreaImpl::item):
(WebKit::StorageAreaImpl::setItem):
(WebKit::StorageAreaImpl::removeItem):
(WebKit::StorageAreaImpl::clear):
(WebKit::StorageAreaImpl::contains):
(WebKit::StorageAreaImpl::storageType const):
* WebProcess/WebStorage/StorageAreaImpl.h:
* WebProcess/WebStorage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
(WebKit::StorageAreaMap::~StorageAreaMap):
* WebProcess/WebStorage/StorageAreaMap.h:
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
* WebProcess/WebStorage/StorageNamespaceImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp
Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h
Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp
Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h
Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp
Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h