1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

LibWeb/IDB: Dont set the forced flag when aborting connection

This commit is contained in:
stelar7 2025-04-09 22:51:11 +02:00 committed by Andrew Kaster
parent 32ddeb82d6
commit 7c3de67b16
Notes: github-actions[bot] 2025-04-11 01:14:42 +00:00

View file

@ -149,14 +149,13 @@ WebIDL::ExceptionOr<GC::Ref<IDBDatabase>> open_a_database_connection(JS::Realm&
auto upgrade_transaction = upgrade_a_database(realm, connection, version, request);
// 7. If connection was closed, return a newly created "AbortError" DOMException and abort these steps.
if (connection->state() == IDBDatabase::ConnectionState::Closed) {
if (connection->state() == IDBDatabase::ConnectionState::Closed)
return WebIDL::AbortError::create(realm, "Connection was closed"_string);
}
// 8. If the upgrade transaction was aborted, run the steps to close a database connection with connection,
// return a newly created "AbortError" DOMException and abort these steps.
if (upgrade_transaction->aborted()) {
close_a_database_connection(*connection, true);
close_a_database_connection(*connection);
return WebIDL::AbortError::create(realm, "Upgrade transaction was aborted"_string);
}
}