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: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
CC: [email protected], [email protected]
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.