[Webkit-unassigned] [Bug 92725] IndexedDB: ObjectStoreMetaDataKey::m_metaDataType should use byte type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 31 20:00:21 PDT 2012


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





--- Comment #7 from xingnan.wang at intel.com  2012-07-31 20:00:22 PST ---
(In reply to comment #6)
> (From update of attachment 155461 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=155461&action=review
> 
> >>> Source/WebCore/Modules/indexeddb/IDBLevelDBCoding.cpp:1089
> >>> +    result->m_metaDataType = *p++;
> >> 
> >> Shall we implement decodeByte()? (For consistency with existing encodeByte().)
> > 
> > Good suggestion.
> 
> For compatibility with existing databases, you can maybe detect here whether it's a byte or var int.  I don't know if that's bulletproof though.  Or you can look into doing a schema upgrade in IDBLevelDBBackingStore::setUpMetadata.  That might be slow.  Some experimentation might be needed.

m_metaDataType is always less than 8, which is encoded by encodeVarInt() with only one byte. Also encodeByte() uses one byte to store the data with the same way. So could we think it would not fail for the existing data in disk?

-- 
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