Closed
Bug 1176165
Opened 9 years ago
Closed 9 years ago
Fix error codes for {create,delete}{ObjectStore,Index}
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
mozilla41
People
(Reporter: bent.mozilla, Assigned: bent.mozilla)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
4.30 KB,
patch
|
janv
:
review+
|
Details | Diff | Splinter Review |
Attachment #8624619 -
Flags: review?(Jan.Varga)
Updated•9 years ago
|
Attachment #8624619 -
Flags: review?(Jan.Varga) → review+
Assignee | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Assignee | ||
Comment 3•9 years ago
|
||
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?
Updated•9 years ago
|
status-firefox40:
--- → affected
Comment 4•9 years ago
|
||
> [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)
Flags: needinfo?(bent.mozilla)
Assignee | ||
Comment 5•9 years ago
|
||
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.
Flags: needinfo?(bent.mozilla)
Comment 6•9 years ago
|
||
OK, does this need the documentation to be updated?
Flags: needinfo?(bent.mozilla)
Updated•9 years ago
|
Attachment #8624619 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #6)
> OK, does this need the documentation to be updated?
Ah, looks like it does. Thanks.
Flags: needinfo?(bent.mozilla)
Keywords: dev-doc-needed
Comment 9•9 years ago
|
||
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+
Comment 10•9 years ago
|
||
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?
Comment 11•9 years ago
|
||
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
Flags: needinfo?(bent.mozilla)
Comment 12•9 years ago
|
||
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.)
Updated•9 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•