[Webkit-unassigned] [Bug 58762] localStorage string values truncated at \x00 characters on browser restart

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 14 08:38:00 PDT 2011


--- Comment #4 from Jonathan Dong <jonathan.dong at torchmobile.com.cn>  2011-06-14 08:38:00 PST ---
(In reply to comment #3)
> Yeah, at the very least the value should not change when the browser is restarted.  It's likely getting mangled in SQLite, but I'm not entirely sure.  (In IndexedDB, we switched to using a blob type in SQLite to avoid similar problems.)

you are right, I traced the codes, and the string was mangled by SQLite when generate SQL insert statement using sqlite3_bind_text() in SQLiteStatement::bindText(), which was called in StorageAreaSync::sync() as the value string was treated as a string.

So I suppose the best way to handle this bug is to use BLOB instead of TEXT as the value type in ItemTable.

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