Comment on attachment 8624619 [details] [diff] [review] Patch, v1 Approval Request Comment [Feature/regressing bug #]: This behavior is very old [User impact if declined]: Wrong error codes thrown in certain edge cases [Describe test coverage new/current, TreeHerder]: WPT tests [Risks and why]: Extremely low risk, just changes the error codes returned. [String/UUID change made/needed]: None
Attachment #8624619 - Flags: approval-mozilla-aurora?
> [Feature/regressing bug #]: This behavior is very old Ben, why do you think we should take it now? > [User impact if declined]: Wrong error codes thrown in certain edge cases What is the impact for users? (I don't know much about IndexedDB)
This isn't really a user problem, it's a web developer problem. Without this patch they can't distinguish between two different error cases. Not a big deal, but the patch is also very simple.
OK, does this need the documentation to be updated?
Attachment #8624619 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(In reply to Sylvestre Ledru [:sylvestre] from comment #6) > OK, does this need the documentation to be updated? Ah, looks like it does. Thanks.
Needs rebasing for Aurora uplift.
Comment on attachment 8624619 [details] [diff] [review] Patch, v1 This missed the uplift. Please request Beta approval on the rebased patch once it's ready.
Attachment #8624619 - Flags: approval-mozilla-aurora+
Hi there, Could someone just confirm which methods of IDBIndex and IDBOBjectStore this applies to, and what the change is exactly? most of the likely methods list both InvalidStateError and TransactionInactiveError, for example https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add But I guess the descriptions of when those errors are thrown just need updating?
IDBDatabase::CreateObjectStore and IDBDatabase::DeleteObjectStore - used to throw InvalidStateError only - it now throws TransactionInactiveError if the "versionchange" transaction is not active IDBObjectStore::CreateIndex, IDBObjectStore::DeleteIndex - used to throw InvalidStateError only - it now throws TransactionInactiveError if the transaction this IDBObjectStore belongs to is not active
Thanks Jan - this is really helpful! I have updated the error descriptions on these methods as follows: https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/deleteObjectStore https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/deleteIndex Let me know if these sound ok. (the first one is currently wrong; I've edited the content, but it is refusing to update the display and still coming up with the old content because of an annoying bug; should be fixed soon.)
You need to log in before you can comment on or make changes to this bug.