- From: Joshua Bell <notifications@github.com>
- Date: Fri, 03 Mar 2017 14:18:39 -0800
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/IndexedDB/issues/161@github.com>
There's a note in the [request definition](https://w3c.github.io/IndexedDB/#request-construct): > Requests are not typically re-used, but there are exceptions. When a cursor is iterated, the success of the iteration is reported on the same request object used to open the cursor. And when an upgrade transaction is necessary, the same open request is used for both the upgradeneeded event and final result of the open operation itself. In both cases, the request’s done flag will be unset then set again, and the result may change. For cursor iteration there are explicit _"Unset the done flag on request."_ steps (e.g. in [continue()](https://w3c.github.io/IndexedDB/#dom-idbcursor-continue)). But there's nothing in the [steps for upgrade transactions](https://w3c.github.io/IndexedDB/#upgrade-transaction-steps). I'd expect a final step there that unsets the done flag. Ostensibly this would be visible as a change in the request's `readyState` between the "complete" event fired at the transaction and the "success" event fired at the request. However... I'm unable to test this in either Chrome or Firefox. In Chrome, at least, the code that queues the "complete" and "success" doesn't really leave room for anything to happen in between, at least not in a non-racy way. So... the note is inconsistent with the spec, but changing the spec without a test seems weird. -- 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/161
Received on Friday, 3 March 2017 22:19:15 UTC