1. All the changes made to the by the transaction are reverted. For this includes changes to the set of object stores and , as well as the change to the version. Any and indexes which were created during the transaction are now considered deleted for the purposes of other algorithms.

    2. If transaction is an , run the steps to abort an upgrade transaction with transaction.

      This reverts changes to all , object store handle, and instances associated with transaction.

    3. Set transaction’s state to .

    4. If error is not null, set transaction’s error to error.

      1. Set request’s to undefined.

      2. Set request’s error to a newly ““ [DOMException](https://heycam.github.io/webidl/#idl-DOMException).

      3. Fire an event named at request with its [bubbles](https://dom.spec.whatwg.org/#dom-event-bubbles) and attributes initialized to true.

    1. Queue a task to run these steps:

      1. If transaction is an , then:

        1. Let request be the open request associated with transaction.

        2. Set request’s to null.

        3. Set request’s result to undefined.