[Bug 7938] New: SECURITY_ERR when disallowing Database open is inconsistent with QUOTA_EXCEEDED_ERR for disallowing setItem

http://www.w3.org/Bugs/Public/show_bug.cgi?id=7938

           Summary: SECURITY_ERR when disallowing Database open is
                    inconsistent with QUOTA_EXCEEDED_ERR for disallowing
                    setItem
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Web Storage
        AssignedTo: ian@hixie.ch
        ReportedBy: nikunj.mehta@oracle.com
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org


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.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Saturday, 17 October 2009 00:23:03 UTC