-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create/deleteObjectStore: InvalidStateError logic does not match impls/tests #192
Comments
I think to fix this properly will require:
This is because right after calling abort() we would consider the transaction "finished" but yet implementations still give TransactionInactiveError. Implementations still consider the database to have an associated upgrade transaction until the commit/abort actually fires. The current "... the upgrade transaction associated with database..." text is squishy since a transaction always has an associated database even after it is finished. So that would invert to "... the database's associated upgrade transaction..." |
Btw one nit, FWIW, in regard to In "steps to asynchronously execute a request", the step "If transaction is not active, throw a "TransactionInactiveError" DOMException." can I think be an assertion as a check appears to always be made before running the steps. |
Yep, that's correct. |
…ObjectStore` - Refactoring (spec parity): Reflect new steps at w3c/IndexedDB#192
Spec has:
But in this case, a TransactionInactiveError is thrown instead in Chrome/Firefox and asserted as such in tests:
Noted by the ever vigilant @brettz9 over in web-platform-tests/wpt#5612 but it's the spec that's wrong here since impls/tests match.
Unfortunately, the "finished" notion for transactions is a bit squishy. Spec-wise we may be able to just drop the "or it is finished" bit from these methods and then tidy up the transaction lifecycle at some point in the future.
The text was updated successfully, but these errors were encountered: