This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7938 - SECURITY_ERR when disallowing Database open is inconsistent with QUOTA_EXCEEDED_ERR for disallowing setItem
Summary: SECURITY_ERR when disallowing Database open is inconsistent with QUOTA_EXCEED...
Status: RESOLVED WONTFIX
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Web Storage (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2009-10-17 00:22 UTC by Nikunj Mehta
Modified: 2009-10-21 09:09 UTC (History)
3 users (show)

See Also:


Attachments

Description Nikunj Mehta 2009-10-17 00:22:59 UTC
In WebDatabase:

The user agent may raise a SECURITY_ERR exception instead of returning a
Database object if the request violates a policy decision (e.g. if the user
agent is configured to not allow the page to open databases).

Under setItem(), the Web Storage spec says:

# If it couldn't set the new value, the method must raise an 
# QUOTA_EXCEEDED_ERR exception. (Setting could fail if, e.g., the user has 
# disabled storage for the site, or if the quota has been exceeded.)

Per Jonas [1]:

It seems silly to [sic] for *every* feature mention that the UA may do something different if the user has opted to disable a feature for whatever reason.

[1] http://www.w3.org/mid/63df84f0909211145y2837d45fpb50f5285f740144c@mail.gmail.com

Both cases look similar enough and it feels inappropriate to proliferate error codes for each different situation.

Proposal: Use one error code for both.
Comment 1 Ian 'Hixie' Hickson 2009-10-21 09:09:45 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: QUOTA_EXCEEDED_ERR makes sense when you're trying to _set_ something, because disabling setting is like making the quota zero. SECURITY_ERR makes sense when _opening_ something, because that's what's used on the platform consistently for that kind of error. I think making these two consistent would be inappropriate.