<?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>10064</bug_id>
          
          <creation_ts>2010-07-02 09:40:54 +0000</creation_ts>
          <short_desc>Modifying functions should throw when called under invalid conditions</short_desc>
          <delta_ts>2010-07-02 20:01:54 +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>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonas Sicking (Not reading bugmail)">jonas</reporter>
          <assigned_to name="Andrei Popescu">andreip</assigned_to>
          <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>36533</commentid>
    <comment_count>0</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-07-02 09:40:54 +0000</bug_when>
    <thetext>There are a number of situations where we immediately upon call to modifying functions know that the call was made in error without consulting the database. This applies in the following situations:

1. When IDBObjectStore.add, IDBObjectStore.put, IDBObjectStore.remove, IDBCursor.update or IDBCursor.remove is called from a READ_ONLY transaction.
2. When the object provided to add/put/update can&apos;t be cloned using the structured clone algorithm. (we can rely on HTML5 to define when and what this throws)
3. When IDBCursor.update is called in such a way that it alters the key of the object. (only apples to in-line keys)
4. When IDBObjectStore.add or IDBObjectStore.put is called on an objectStore which doesn&apos;t use a key generator, and no key is provided (note that keys are supplied in-line in some stores)


For more details about rationale, see the thread started at
http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0002.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36542</commentid>
    <comment_count>1</comment_count>
    <who name="Andrei Popescu">andreip</who>
    <bug_when>2010-07-02 20:01:54 +0000</bug_when>
    <thetext>Fixed in 

http://dvcs.w3.org/hg/IndexedDB/rev/e039f9694056
http://dvcs.w3.org/hg/IndexedDB/rev/0ac9282957a0</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>