Closed Bug 352704 Opened 18 years ago Closed 18 years ago

Should clear DOM storage when Clear Private Data is used

Categories

(Firefox :: Settings UI, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: enndeakin, Assigned: enndeakin)

References

Details

(Keywords: fixed1.8.1)

Attachments

(4 files, 2 obsolete files)

 
Flags: blocking-firefox2+
I'm guessing this would clear along with cookies?
Given localization concerns tieing it to cookies might be our only choice at this late point, and easy to explain to users: DOM Storage is just "super cookies". But I think it's ultimately a bad choice that will discourage use of the feature and should eventually get it's own checkbox setting. (Maybe that has to wait for FF3)

If sites ever actually store useful data in there (like local writely documents)  users might well want to clear their cookies and not blow away the DOM Storage.

But it absolutely must be clearable one way or another -- if people think they've cleaned up their tracks and they've got persistent backup cookies in DOM Storage (a likely first use for the feature, as with Flash local storage) they will be quite upset.
We cannot touch l10n, so cookies it is (for now)

Neil, do you have an ETA?
The only issue is that the Cookies option is disabled when there are no cookies.
Attachment #238567 - Flags: superreview?(dveditz)
Attachment #238567 - Flags: review?(jst)
Comment on attachment 238642 [details] [diff] [review]
Always enable clear all cookies options in Clear Private Data and Cookies dialogs

r=me, thanks Neil!
Attachment #238642 - Flags: review?(mconnor) → review+
Comment on attachment 238567 [details] [diff] [review]
Clear DOM Storage when cookies are deleted

- In nsLayoutStatics::Initialize():

   if (!txXSLTProcessor::init()) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
+  nsDOMStorageManager::Initialize();

This can return error codes, don't loose them, return early on error.

r=jst with that.
Attachment #238567 - Flags: review?(jst) → review+
Comment on attachment 238642 [details] [diff] [review]
Always enable clear all cookies options in Clear Private Data and Cookies dialogs

sr=dveditz
Attachment #238642 - Flags: superreview+
Comment on attachment 238567 [details] [diff] [review]
Clear DOM Storage when cookies are deleted

sr=dveditz
Attachment #238567 - Flags: superreview?(dveditz) → superreview+
I assume writing null to the key in sqlite deletes the actual data off the disk and doesn't just mark it deleted in some way. Is that right?
Comment on attachment 238567 [details] [diff] [review]
Clear DOM Storage when cookies are deleted

a=schrep - thanks Neil, JST, and DVeditz
Attachment #238567 - Flags: approval1.8.1+
Comment on attachment 238642 [details] [diff] [review]
Always enable clear all cookies options in Clear Private Data and Cookies dialogs

a=schrep - thanks Neil, JST, and DVeditz
Attachment #238642 - Flags: approval1.8.1+
Checked into trunk
Please land on 1.8 branch...
Whiteboard: [checkin needed (1.8 branch)]
Attachment #238864 - Flags: superreview?(dveditz)
Attachment #238864 - Flags: review?
Attachment #238864 - Flags: review? → review?(mconnor)
Comment on attachment 238864 [details] [diff] [review]
Proposed fix for building xulrunner minimal configuration

I'm so far away from being the right reviewer here, but are there cases where we build DOMStorage without MOZ_STORAGE?
Attachment #238864 - Flags: review?(mconnor) → review?(jst)
Comment on attachment 238864 [details] [diff] [review]
Proposed fix for building xulrunner minimal configuration

Neil ought to review this, he's the owner of this code.
Attachment #238864 - Flags: review?(jst) → review?(enndeakin)
Comment on attachment 238864 [details] [diff] [review]
Proposed fix for building xulrunner minimal configuration

You may have mistook the MOZ_STORAGE define to refer to DOMStorage (actually called Client-side persistent storage). The define instead refers to the sqllite component.

This patch appears to just remove the clearing ability for session-only storage when MOZ_STORAGE is not defined, and session-only storage doesn't even use the database.

Could you describe what the actual build error is?
Attachment #238864 - Flags: review?(enndeakin) → review-
Attached file Build log with error (obsolete) —
mozilla/dom/src/base/../storage/nsDOMStorage.h:69: error: ISO C++ forbids declaration of ‘nsDOMStorage’ with no type
mozilla/dom/src/base/../storage/nsDOMStorage.h:69: error: expected ‘;’ before ‘*’ token
mozilla/dom/src/base/../storage/nsDOMStorage.h:91: error: ‘nsDOMStorage’ has not been declared
mozilla/dom/src/base/../storage/nsDOMStorage.h:92: error: ‘nsDOMStorage’ has not been declared
Attachment #238953 - Attachment is obsolete: true
I think this has caused new crashes @  nsSubstring::IsDependentOn
For example
http://talkback-public.mozilla.org/search/start.jsp?search=2&type=iid&id=23398975

Attachment #238864 - Attachment is obsolete: true
Attachment #238864 - Flags: superreview?(dveditz)
Attachment #238984 - Flags: superreview?(dveditz)
Attachment #238984 - Flags: review?(enndeakin)
I think this has also caused crashes @ PL_DHashTableEnumerate.
So #24 and #31 in the TB trunk crashes. 
Attachment #238984 - Flags: review?(enndeakin) → review+
Comment on attachment 238984 [details] [diff] [review]
the problem was that nsDOMStorageDB forward declares nsDOMStorage

this is trivial and shouldn't need SR, please just get patches landed
Attachment #238984 - Flags: superreview?(dveditz) → approval1.8.1+
Checked the last patch in, and both to 1.8
Whiteboard: [checkin needed (1.8 branch)]
sr=me, although the request had been removed by time I got here from my mail.

(In reply to comment #22)
> I think this has caused new crashes

Please file regression bugs on the crashes and mark them "blocking" this bug (so they appear in this bug's "depends on" list), and preferably add a comment here saying "filed bugs x,y,z".  Might as well nominate them for blocking FF2 so they'll get looked at.

Could this be something simple like the clearing code not handling an already-empty DOMStorage? I can't imaging there's any real-world use of storage yet, certainly not enough to be registering top crashes.
Whiteboard: [checkin needed (1.8 branch)]
Whiteboard: [checkin needed (1.8 branch)]
Marking fixed, please spin off new bugs for crashes/regressions, as dveditz noted
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: