<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7938</bug_id>
          
          <creation_ts>2009-10-17 00:22:59 +0000</creation_ts>
          <short_desc>SECURITY_ERR when disallowing Database open is inconsistent with QUOTA_EXCEEDED_ERR for disallowing setItem</short_desc>
          <delta_ts>2009-10-21 09:09:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Web Storage (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NE</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikunj Mehta">nikunj.mehta</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28424</commentid>
    <comment_count>0</comment_count>
    <who name="Nikunj Mehta">nikunj.mehta</who>
    <bug_when>2009-10-17 00:22:59 +0000</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28696</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2009-10-21 09:09:45 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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&apos;re trying to _set_ something, because disabling setting is like making the quota zero. SECURITY_ERR makes sense when _opening_ something, because that&apos;s what&apos;s used on the platform consistently for that kind of error. I think making these two consistent would be inappropriate.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>