WebSQL databases should not openable in private browsing.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Mar 2017 19:06:31 +0000 (19:06 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Mar 2017 19:06:31 +0000 (19:06 +0000)
commit982137689ab1fdbb2f2e68773da9ddfaccf48a73
tree6072e9683951b4d34fa8caa5862f7ac87c13085d
parent6ea0762f686be1626d4ad8c93b8a94182c3d0fc2
WebSQL databases should not openable in private browsing.
<rdar://problem/30383335> and https://bugs.webkit.org/show_bug.cgi?id=170013

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/websql/private-browsing-open-disabled.html

* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::tryToOpenDatabaseBackend): Throw an exception if in private browsing.
* Modules/webdatabase/DatabaseManager.h:

LayoutTests:

* storage/websql/private-browsing-open-disabled-expected.txt: Added.
* storage/websql/private-browsing-open-disabled.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/storage/websql/private-browsing-open-disabled-expected.txt [new file with mode: 0644]
LayoutTests/storage/websql/private-browsing-open-disabled.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/DatabaseManager.cpp
Source/WebCore/Modules/webdatabase/DatabaseManager.h