Closed
Bug 880079
Opened 13 years ago
Closed 6 years ago
Clearing Browser Data After Writing a Large String to Local Storage & Trying to Write that String Again fails with a DOM Exceeded Quota Error
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P5)
Tracking
()
RESOLVED
WORKSFORME
| blocking-b2g | - |
People
(Reporter: jsmith, Assigned: fabrice)
Details
Attachments
(1 file, 1 obsolete file)
|
1.05 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
Build: 1.01 6/5/2013 Inari
STR
1. Go to http://jds2501.github.io/webapi-permissions-tests/largelocalstorage.html
2. Select write local storage
3. Reload - notice the string is present
4. Clear browser data in the browser
5. Reload - notice the string is gone
6. Select write local storage
Expected
The string should be written - we've just freed all data for this origin.
Actual
The string fails to be written with the DOM Quota Exceeded.
| Reporter | ||
Comment 1•13 years ago
|
||
DOM Quota Exceeded Error meant to say in actual results
| Assignee | ||
Comment 2•13 years ago
|
||
Ben, this happens on 1.0,1 but not current trunk, so I guess the new quota manager somehow does not suffer from the same issue.
Flags: needinfo?(bent.mozilla)
Comment 3•13 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #2)
> Ben, this happens on 1.0,1 but not current trunk, so I guess the new quota
> manager somehow does not suffer from the same issue.
On trunk (mozilla-central) is the new DOM storage code. It, at this moment, has its own specific simple quota manager and that probably doesn't suffer from this bug. The new quota manager - the global one, not the DOM storage specific - is not used by DOM storage right now (ask Jan Varga for more details).
Sounds like this isn't actually related to the new QuotaManager that Jan added.
Flags: needinfo?(bent.mozilla)
Comment 5•13 years ago
|
||
Yeah, I don't think this is related to the new QuotaManager.
| Assignee | ||
Comment 6•13 years ago
|
||
Assignee: nobody → fabrice
Attachment #761216 -
Flags: review?(mounir)
Comment 7•12 years ago
|
||
Comment on attachment 761216 [details] [diff] [review]
patch
Review of attachment 761216 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with mCachedOwner being truncated.
::: dom/src/storage/nsDOMStoragePersistentDB.cpp
@@ +694,5 @@
>
> MarkAllScopesDirty();
>
> + // Reset mCachedUsage since it will be reused in GetUsageInternal.
> + mCachedUsage = 0;
I think you want to do:
mCachedUsage = 0;
mCachedOwner.Truncate();
Attachment #761216 -
Flags: review?(mounir) → review+
| Assignee | ||
Updated•12 years ago
|
blocking-b2g: --- → leo?
| Assignee | ||
Comment 8•12 years ago
|
||
Attachment #761216 -
Attachment is obsolete: true
Attachment #762881 -
Flags: review+
| Assignee | ||
Updated•12 years ago
|
status-b2g18:
--- → affected
status-b2g-v1.1hd:
--- → affected
Comment 9•12 years ago
|
||
* what's the user impact?
* what's the risk of this change?
* are there tests that ensure this works as expected, and cannot be regressed in the future?
| Reporter | ||
Comment 10•12 years ago
|
||
(In reply to Dietrich Ayala (:dietrich) from comment #9)
> * what's the user impact?
More developer impacting than user impacting. In the developer case, they won't be able to write the same large data again after clearing stored data in the browser that they were previously able to write before data was cleared.
>
> * what's the risk of this change?
Fabrice is out until 6/29, so I'll redirect to Mounir on this.
>
> * are there tests that ensure this works as expected, and cannot be
> regressed in the future?
The patch doesn't appear to have tests.
Flags: needinfo?(mounir)
Comment 11•12 years ago
|
||
(In reply to Dietrich Ayala (:dietrich) from comment #9)
> * what's the user impact?
What Jason said.
> * what's the risk of this change?
Pretty low. It is simply invalidating some cache when we clear apps data.
> * are there tests that ensure this works as expected, and cannot be
> regressed in the future?
This bug doesn't appear in m-c but we could definitively have a mochitest. Jason, is there any chance you could write a mochitest for this bug based on the STR you wrote in comment 0?
Flags: needinfo?(mounir)
Comment 12•12 years ago
|
||
Shipped in 1.0.1, no more critical for 1.1 than for that release. 1.7mb strings seem very unlikely. Let's fix in 1.2, if it's affected.
blocking-b2g: leo? → -
Comment 13•12 years ago
|
||
Any update on this?
Updated•8 years ago
|
Priority: -- → P5
Comment 14•6 years ago
|
||
:janv, can you please check if this is still an issue? Seems obsolete to me due to newer versions of QuotaManager.
Flags: needinfo?(jvarga)
Comment 15•6 years ago
|
||
I'll try to reproduce with both localStorage implementations.
Comment 16•6 years ago
|
||
This is not an issue anymore with LSNG (data for given site/origin can be easily deleted in Preferences - "Site Data Manager").
Clearing data when the old localStorage is enabled is more difficult, I had to go to "Clear Recent History..." and clear all "Offline Website Data".
Anyway, the bug was originally reported for Firefox OS which had a different way to clear browser data.
Status: NEW → RESOLVED
Closed: 6 years ago
Component: Storage: IndexedDB → Storage: localStorage & sessionStorage
Flags: needinfo?(jvarga)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•