forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Un-revert Handling LevelDB errors encountered after open.
The previous IndexedDB implementation only checked for (and reported) corrupted LevelDB's during open. If they are determined to be corrupted during use then the database was simply closed. The page would be unaware of this, and would likely reopen the database at a later time (which would work) only to fail again during a read/write operation. There was no way for the page to get out of that corrupted state - the user would have to delete all origin data. This change will record the fact that the backing store was corrupted, and during open this would be read and, if present, result in the same dataLoss state being reported to the page in the upgradeneeded event. Also split IndexedDBBackingStore's REPORT_ERROR macro in two: REPORT_ERROR_UNTESTED (which calls NOTREACHED) and REPORT_ERROR. REPORT_ERROR is used for errors which are encountered during tests. This was done so that runtime errors could still be caught during a debug build run. The original change (r260147) had a buffer overrun in a unit test fixed in this CL. BUG=322707 R=isherman@chromium.org, jochen@chromium.org, jsbell@chromium.org Review URL: https://codereview.chromium.org/197333009 Patch from Christopher Mumford <cmumford@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260697 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
jsbell@chromium.org
committed
Mar 31, 2014
1 parent
391ce67
commit f857c5a
Showing
12 changed files
with
618 additions
and
114 deletions.
There are no files selected for viewing
282 changes: 203 additions & 79 deletions
282
content/browser/indexed_db/indexed_db_backing_store.cc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.