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. If error is not null, set transaction’s error to error.

    4. For each request in transaction’s with done flag unset, abort the steps to for request and queue a task to run these steps:

      1. Set the of request to undefined.

      2. Set the error of request to a newly ““ [DOMException](https://www.w3.org/TR/WebIDL-1/#idl-DOMException).

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

    1. to run these steps:

      1. If transaction is an upgrade transaction, then:

        1. Let request be the associated with transaction.

        2. Set request’s transaction to null.

        3. Unset request’s .