[Webkit-unassigned] [Bug 56703] window.localStorage should throw SECURITY_ERR when localStorage is disabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 2 09:43:51 PST 2011


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





--- Comment #12 from Brady Eidson <beidson at apple.com>  2011-12-02 09:43:51 PST ---
(In reply to comment #10)
> (In reply to comment #9)
> > (From update of attachment 117595 [details] [details])
> > I see, it’s a “match the specification” change. I suspect this will cause problems with some websites. Not sure what to do about that.
> 
> I do not agree that this is a "match the specification" change.

To elaborate:

I agree that the spec suggests that if a user agent supports LocalStorage but LocalStorage is currently disabled, a security exception should be thrown.

WebKit is not a "web browser" engine but rather a "web content rendering* engine.  LocalStorage is something that a user agent can support but many don't want to support it.

In Safari, for example, the LocalStorage object is always there because Safari nominally supports it.  Even when accessing it might throw an exception such as when private browsing is enabled, or might fail for other reasons such as when the quota has been lowered below the current usage.

But in another WebKit application they might never want LocalStorage to work.  They are a user agent that renders web content but not with LocalStorage support.  LocalStorage isn't just disabled;  It is meant to not exist at all within that user agent.

There's many WebKit apps besides browsers.  Many of those have never had LocalStorage support and don't want it.  This change will break them by causing them to start throwing exceptions where they didn't in the past.

I think some confusion might be over the naming of "localStorageEnabled()" as a setting.  That suggests this represents some checkbox that a browser user could flip.  We could rename the setting in code to "localStorageSupported()" to alleviate this confusion in the future.

If we want to support this edge case of the spec in WebKit I think we should add a new setting that is explicitly about "LocalStorage is supported in this user agent, but it's use is currently disallowed."

===

All of that said...  this is clearly a "may" clause in the spec, not a "has to" clause.  Is there any reason we think this is important?

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