There are various cases where an IDB method may throw for multiple reasons. For example, when putting a value:
* transaction is read-only
* value can't be cloned
* key is invalid
* store was deleted
* transaction is inactive
* transaction has completed
Blink's impl adheres to the spec in that we throw in all of those cases, but if two cases apply we're not consistent with other browsers. Other browsers aren't consistent either, so this is not high priority, but it would be nice to fix.
Spec issue, tracking differences:
https://github.com/w3c/IndexedDB/issues/11
We might as well align with FF as we're pretty close and it's mostly just IDBCursor methods where we differ.
The tricky part is not the fix - it's very simple code changes - it's writing the tests.
Comment 1 by jsb...@chromium.org
, Mar 23 2016