[Webkit-unassigned] [Bug 102243] New: IndexedDB: Check SSV version when opening database

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 14 08:51:40 PST 2012


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

           Summary: IndexedDB: Check SSV version when opening database
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jsbell at chromium.org
                CC: dgrogan at chromium.org, alecflett at chromium.org
            Blocks: 102230


Scenario:

(1) SSV is revved from 5 to 6 to support a new data type (e.g. uchar strings)
(2) IndexedDB records are persisted to disk using the new type
(3) User "downgrades" to an older browser version without clearing IDB profile directory
(4) IndexedDB opens backing store - everything looks fine
(5) When opening a record, SSV fails decoding the data type from the future - sadness

Ideally:

(1) SSV is revved from 5 to 6 to support a new data type (e.g. uchar strings)
(2) IndexedDB records are persisted to disk using the new type
(3) User "downgrades" to an older browser version without clearing IDB profile directory
(4) IndexedDB opens backing store, and detects that the SSV version is not known
(5) IndexedDB does its recovery stuff (just like if there was an schema change)

We either need to always bump the IDB internal schema version when the SSV encoding changes, or have IDB record the SSV version and check it as well as its internal schema version. Or something equally clever. Doing this when a record is read is insufficient - this MUST be done at backing store open time or data corruption can occur.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list