Re: [w3c/IndexedDB] Validate exception ordering against implementations (#11)

Order of exceptions thrown from renaming object stores and indexes differs

For IDBIndex, the name attribute’s setter runs these steps:
...
4. If transaction is not an upgrade transaction, throw an InvalidStateError.
5. If transaction is not active, throw a TransactionInactiveError.
6. If index or index’s object store has been deleted, throw an InvalidStateError.
7. If index’s name is equal to name, terminate these steps.
8. If an index named name already exists in index’s object store, throw a ConstraintError.
...

For IDBObjectStore, the name attribute's setter runs these steps:
...
4. If store has been deleted, throw an InvalidStateError.
5. If transaction is not an upgrade transaction, throw an InvalidStateError.
6. If transaction is not active, throw a TransactionInactiveError.
7. If store’s name is equal to name, terminate these steps.
8. If an object store named name already exists in store’s database, throw a ConstraintError.
...

The "if the is deleted..." exception is in different places for each of these, but should be in the same place.

I'm implementing these in WebKit now and *really* don't want to follow the spec on this. Could we pick one or the other?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/11#issuecomment-255413161

Received on Friday, 21 October 2016 15:48:28 UTC