Use a two-part data format version in IndexedDB metadata

Desktop / Chromium - jbroman [chromium.org] - 20 April 2017 10:25 EDT

This breaks the 64-bit data format version stored in the database metadata into two 32-bit parts (V8 and Blink format versions), and allows them to be compared by checking that the database uses supported versions of both.

If either component has reverted, the database is deemed to be from the future (i.e. corrupt).

BUG=704293

Review-Url: https://codereview.chromium.org/2773823002 Cr-Commit-Position: refs/heads/master@{#466002}

3ee0c8a Use a two-part data format version in IndexedDB metadata.
content/browser/BUILD.gn | 2 +
.../browser/indexed_db/indexed_db_backing_store.cc | 45 ++++++-----
.../indexed_db/indexed_db_data_format_version.cc | 16 ++++
.../indexed_db/indexed_db_data_format_version.h | 72 +++++++++++++++++
.../indexed_db/indexed_db_factory_unittest.cc | 89 +++++++++++++++++++++-
.../browser/indexed_db/leveldb_coding_scheme.md | 6 +-
6 files changed, 205 insertions(+), 25 deletions(-)

Upstream: git.chromium.org


  • Share