Release assertion in WebPage::updatePreferences
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Feb 2018 20:44:50 +0000 (20:44 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Feb 2018 20:44:50 +0000 (20:44 +0000)
commit37f7ea06ce4622d9083e15d66b65402064dc3927
tree6b45cd2752dd9333c690661758fb66de72d1b806
parentaeffcf5dcf308a702d976459f1fd4fd9c5425fcd
Release assertion in WebPage::updatePreferences
https://bugs.webkit.org/show_bug.cgi?id=183075

Reviewed by Youenn Fablet and Chris Dumez.

Replaced the release assertion added in r228589 with a more graceful disabling of the feature when the entitlement is missing.

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::didReceiveMessage): Added an early exit with an entitlement check to disable the feature.
(WebKit::StorageProcess::initializeWebsiteDataStore): Ditto.
(WebKit::StorageProcess::createStorageToWebProcessConnection): Replaced the release assertion with a debug assertion.
(WebKit::StorageProcess::swServerForSession): Removed the assertion. This code can be reached when the service worker is disabled.
(WebKit::StorageProcess::registerSWServerConnection): Replaced the release assertion with a debug assertion.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Disable the feature instead of crashing when the entitlement is missing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/StorageProcess/StorageProcess.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp