Skip to content

Commit

Permalink
[IndexedDB] Handle corruption in GetDatabaseNames
Browse files Browse the repository at this point in the history
Bug: 829141, 847681
Change-Id: I6679e700049fb13d94322a4e8b0f87bc1310fe9e
Reviewed-on: https://chromium-review.googlesource.com/1077677
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562708}
  • Loading branch information
dmurph authored and Commit Bot committed May 30, 2018
1 parent 183123b commit 10cc957
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions content/browser/indexed_db/indexed_db_factory_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,13 @@ void IndexedDBFactoryImpl::GetDatabaseNames(
OpenBackingStore(origin, data_directory, request_context_getter,
&data_loss_info, &disk_full, &s);
if (!backing_store.get()) {
callbacks->OnError(
IndexedDBDatabaseError(blink::kWebIDBDatabaseExceptionUnknownError,
"Internal error opening backing store for "
"indexedDB.webkitGetDatabaseNames."));
IndexedDBDatabaseError error(
blink::kWebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16("Internal error opening backing store for "
"indexedDB.webkitGetDatabaseNames."));
callbacks->OnError(error);
if (s.IsCorruption())
HandleBackingStoreCorruption(origin, error);
return;
}

Expand Down

0 comments on commit 10cc957

Please sign in to comment.