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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 29 06:37:19 PDT 2011


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





--- Comment #30 from Naveen Bobbili <naveenbobbili at motorola.com>  2011-09-29 06:37:18 PST ---
I checked from my end to make an attempt to checkin code changes to Sqlite3 api code in chrome. It is not approved. 
So we might have to make changes in LocalStorage code.
There are 2 approaches that I could think of

1) Since local storage doesn't allow NULL blobs so we surely know that if we get a NULL pointer for sqlite3_column_blob() API it is because we have stored an empty string. Keeping this in perspective we can check if blobisempty and return TRUE when sqlite3_column_blob() return NULL . But this patch has some evident problems. The check would return TRUE for caller who allow storing NULL blobs also. So its not consistent.

2) Add a new column inside local storage TABLE which sets an INTEGER value to 1 when if we are storing EMPTY string and 0 other wise. While retrieving the value from db we can use this column's value. 

Please let me know which is the preferred solution, so that I can put up a patch for the same.

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