New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 697908 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

The dom storage quota is 5 MiB instead of 10

Project Member Reported by pasko@chromium.org, Mar 2 2017

Issue description

We seem to want to have a 10MiB quota for localstorage [1]. But only around 5MiB is allowed according to various webby tests like [2].

I think the problem is that for accounting we multiply by 2 the length of the strings *in bytes* (as specified by std::string spec) in [3].

Please double-check, I am not 100% confident in my knowledge of the code.

[1] kPerStorageAreaQuota is 10MiB
    https://codesearch.chromium.org/chromium/src/content/common/dom_storage/dom_storage_types.h?q=kPerStorageAreaQuota&l=24

[2] localstorage test
    https://arty.name/localstorage.html

[3] definition of size_of_item() in dom_storage_map
    https://codesearch.chromium.org/chromium/src/content/common/dom_storage/dom_storage_map.cc?type=cs&q=size_of_item+package:%5Echromium$&l=13

[4] announcement of quota increase
    https://plus.google.com/u/0/+FrancoisBeaufort/posts/S5Q9HqDB8bh
 
I believe* this works as intended as LocalStorage uses UTF-16 characters (in DOMString) to store keys and values, which takes up a lot of space, particularly if ASCII characters are being used [1].

This is the case for https://arty.name/localstorage.html
Instead of using characters, use ❤❤❤❤❤❤❤❤❤❤ for instance and you'll get the same quota: 5MB.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=225934
Status: WontFix (was: Assigned)
this is working as intended

Comment 3 by pasko@chromium.org, Mar 24 2017

should we clarify the comment to say that we have 5MiB quota?

Sign in to add a comment