Make sure only WebsiteDataStores with valid SessionIDs register themselves.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Dec 2017 21:15:17 +0000 (21:15 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Dec 2017 21:15:17 +0000 (21:15 +0000)
commit105e41748afa4fdb6492a911cdd659c8bf383892
tree597bb4edcad0c66e74851f05a02a0c2a9cbf5a9f
parent920576478fb1615018214dd88fe2df629cccf0b7
Make sure only WebsiteDataStores with valid SessionIDs register themselves.
https://bugs.webkit.org/show_bug.cgi?id=180869

Reviewed by Chris Dumez.

Some code in WebsiteDataStore assumes an invalid SessionID is a possibility,
but we didn't account for that in the map added in r225935.

Seems prudent to make sure we're not doing hash table operations with invalid keys.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::maybeRegisterWithSessionIDMap):
(WebKit::WebsiteDataStore::existingNonDefaultDataStoreForSessionID):
* UIProcess/WebsiteData/WebsiteDataStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h