Skip to content

Commit d0bfb85

Browse files
stelar7gmta
authored andcommitted
LibWeb/IDB: Mark request as errored if upgrade transaction is aborted
1 parent 62ae4e8 commit d0bfb85

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Libraries/LibWeb/IndexedDB/Internal/Algorithms.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,13 @@ void abort_a_transaction(GC::Ref<IDBTransaction> transaction, GC::Ptr<WebIDL::DO
601601
// 5. Set transaction’s error to error.
602602
transaction->set_error(error);
603603

604+
// FIXME: https://github.com/w3c/IndexedDB/issues/473
605+
// x. If transaction is an upgrade transaction:
606+
if (transaction->is_upgrade_transaction()) {
607+
// 1. Set transaction's associated request's error to a newly created "AbortError" DOMException.
608+
transaction->associated_request()->set_error(WebIDL::AbortError::create(transaction->realm(), "Upgrade transaction was aborted"_utf16));
609+
}
610+
604611
// 6. For each request of transaction’s request list,
605612
for (auto const& request : transaction->request_list()) {
606613
// FIXME: abort the steps to asynchronously execute a request for request,

0 commit comments

Comments
 (0)