Re: [w3c/IndexedDB] Add IDBTransaction commit() method (#242)

I agree that additional constraint on abort() would have been nice.

Spec-wise, I think we're in the clear because, modulo some phrasing ambiguity, I think one can interpret the auto-commit step 7 in [IDB 2.0 2.7.1](https://www.w3.org/TR/IndexedDB/#transaction-lifetime-concept) as saying "run commit a transaction, that could still fail over to run abort a transaction".  And I at least interpreted running either algorithm as marking the transaction finished given how the spec abstracted away the actual backend database work.

Web-wise, it's at least the case that Firefox's auto-commit logic [already sets the transaction's internal state to COMMITTING](https://searchfox.org/mozilla-central/rev/97d488a17a848ce3bebbfc83dc916cf20b88451c/dom/indexedDB/IDBTransaction.cpp#373) which will cause [content calls to abort() to throw](https://searchfox.org/mozilla-central/rev/97d488a17a848ce3bebbfc83dc916cf20b88451c/dom/indexedDB/IDBTransaction.cpp#775).  If Chrome has a race at the current time as it relates to abort(), then perhaps you can think of the change as aligning with Firefox's non-racing implementation ;).

-- 
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/pull/242#issuecomment-401936151

Received on Monday, 2 July 2018 21:06:14 UTC