Commit 994f6a03 authored by jberlin@webkit.org's avatar jberlin@webkit.org

Assertion failure when requesting that storage be deleted for an origin without storage.

https://bugs.webkit.org/show_bug.cgi?id=60709

Reviewed by Darin Adler.

* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncDeleteOrigin):
If the path to the storage location for the givin origin is empty, return early instead of
asserting.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ab338d63
2011-05-12 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
Assertion failure when requesting that storage be deleted for an origin without storage.
https://bugs.webkit.org/show_bug.cgi?id=60709
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncDeleteOrigin):
If the path to the storage location for the givin origin is empty, return early instead of
asserting.
2011-05-12 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
......@@ -452,10 +452,13 @@ void StorageTracker::syncDeleteOrigin(const String& originIdentifier)
openTrackerDatabase(false);
if (!m_database.isOpen())
return;
String path = databasePathForOrigin(originIdentifier);
ASSERT(!path.isEmpty());
String path = databasePathForOrigin(originIdentifier);
if (path.isEmpty()) {
// It is possible to get a request from the API to delete the storage for an origin that
// has no such storage.
return;
}
SQLiteStatement deleteStatement(m_database, "DELETE FROM Origins where origin=?");
if (deleteStatement.prepare() != SQLResultOk) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment