Summary: | IndexedDB: Large integer versions not persisted correctly | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joshua Bell <jsbell> | ||||||
Component: | New Bugs | Assignee: | Joshua Bell <jsbell> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | alecflett, dgrogan, tony, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Joshua Bell
2012-09-05 10:54:42 PDT
Created attachment 162287 [details]
Patch
The database integer version is inconsistently stored/read as an Int vs. VarInt, which shows up when integer versions > 127 are used: transaction->put(intVersionKey, encodeVarInt(IDBDatabaseMetadata::DefaultIntVersion)); -- ok = getInt(m_db.get(), DatabaseMetaDataKey::encode(foundId, DatabaseMetaDataKey::UserIntVersion), foundIntVersion); -- if (!putVarInt(m_db.get(), DatabaseMetaDataKey::encode(rowId, DatabaseMetaDataKey::UserIntVersion), intVersion)) -- if (!putVarInt(m_currentTransaction.get(), DatabaseMetaDataKey::encode(rowId, DatabaseMetaDataKey::UserIntVersion), intVersion)) The getInt call needs to be a getVarInt. Created attachment 162292 [details]
Patch
dgrogan@ - please take a look Comment on attachment 162292 [details]
Patch
LGTM
Comment on attachment 162292 [details]
Patch
tony@ - r? cq?
Comment on attachment 162292 [details] Patch Clearing flags on attachment: 162292 Committed r127685: <http://trac.webkit.org/changeset/127685> All reviewed patches have been landed. Closing bug. |