Commit 2eeb1d81 authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

indexeddb: add comment about corruption blob dir handling

This was confusing about why the leveldb database was deleted in one
place but the blob directory was deleted in another.  New databases
will always need to clean up their blob directory, so it always must be
done there.  Additionally, the blob directory (although we could guess
it) is a property of an open database, and so is hard to plumb through
to this point to delete as well.

Change-Id: I33de3a30910b931c2edf7765cf797e02ed8f46eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518198
Commit-Queue: enne <enne@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823753}
parent cdc6f428
...@@ -480,6 +480,8 @@ void IndexedDBFactoryImpl::HandleBackingStoreCorruption( ...@@ -480,6 +480,8 @@ void IndexedDBFactoryImpl::HandleBackingStoreCorruption(
HandleBackingStoreFailure(saved_origin); HandleBackingStoreFailure(saved_origin);
// Note: DestroyBackingStore only deletes LevelDB files, leaving all others, // Note: DestroyBackingStore only deletes LevelDB files, leaving all others,
// so our corruption info file will remain. // so our corruption info file will remain.
// The blob directory will be deleted when the database is recreated
// the next time it is opened.
const base::FilePath file_path = const base::FilePath file_path =
path_base.Append(indexed_db::GetLevelDBFileName(saved_origin)); path_base.Append(indexed_db::GetLevelDBFileName(saved_origin));
leveldb::Status s = leveldb::Status s =
......
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