W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

[Bug 10064] New: Modifying functions should throw when called under invalid conditions

From: <bugzilla@jessica.w3.org>
Date: Fri, 02 Jul 2010 09:40:55 +0000
To: public-webapps@w3.org
Message-ID: <bug-10064-2927@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10064

           Summary: Modifying functions should throw when called under
                    invalid conditions
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: andreip@google.com
        ReportedBy: jonas@sicking.cc
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org


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

-- 
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 Friday, 2 July 2010 09:40:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:39 GMT